If it was me... I'd wire the 4 joysticks independently to an encoder with enough inputs, rather than wiring them together to a 2p encoder.
Then I'd set Mame to accept either input (P1 rotary joystick UP OR p1 normal joystick UP), for every single game I wanted to run on the cabinet.
It'll take about 45 seconds per game. (If your gamelist is 6,000 long, it will suck, but, huge game lists kind of suck anyway. I maintain that there's only about 150 good games, tops. We may differ in opinion on *which* games those are, but I'm willing to bet money you'll never feel bad that your 151st favorite game wasn't on the list.)
The advantage of doing it this way is that you can then play 2p 2-joystick games like Karate Champ, Smash TV, Total Carnage, T-MEK, and so on, using both joysticks for both players. If you wire them in parallel, you can't ever do that, because the encoder sees the pair as one stick and can't distinguish inputs on one from inputs on the other.
If you don't want to config Mame that way per game, and are willing to lose the 2p 2-joystick games, then I'd say the parallel wiring suggestion is the way to go.