Well, you could config MAME so that the same input counts for P1-P4 coin in. But then a single coin would put a credit to each player. And if, as in your example, P1 dies and drops a coin, EVERYBODY would suddenly have another credit.
With a few TTL chips it'd be easy enough to rig up a round robin type thing where first coin sends credit to P1, second to P2, third to P3, fourth to P4, fifith back to P1. Kind of like a token ring type thing. But then, back to your example, say the last credit went to P3 and P1 dies. He'd have to put in a coin that would go to P4 then another coin that would go to P1 again.
Another option would be to wire 4 buttons AND gated to the coin slot. So to load a credit for P1 you'd press and hold button 1 and drop a coin. To load a credit to P3 you press button 3 and drop a coin. Maybe wire it up so that if NO button is held it counts as P1.
To be absolutely honest though, it'd be WAY easier to just have 4 coin slots.