It works 100% in my head but thought I would ask here as I have no way of testing.
My friend has a 2 headed arcade machine!

Dunno what kind it used to be, but this is the route he is going. He has 2 mame machines in there, one for the left and the other for the right.
He wants to be able to play 2 player games as well, with each player getting their own screen. So I came up with the following:
Video
splitter from left side to a video
select switch on the right - or possibly just use a different input if they are TVs, I don't remember at this point. So that covers the video control - easy enough.
For controls, I suggested him getting a 2-player encoder for the left side, and wiring everything up to it - both sets of controls. And then on the ground coming from the right a select switch that chooses where the ground goes - to the two player encoder on the left or to a one player encoder on the right that also has the button connections going to it.