Fiddling with it a bit, i find that an ordinary single-impulse-ramp setup _usually_ ejects the cart just fine, without the need to get it pushed:
##### ##M##
═▼▼▼═ #═╗═#
..#.. #####
z+1 z0
M- magma inlet. Preferably a flow-fed trench, no pump.
It seems that the acceleration from a ramp is enough to push the cart out of the trench if there's no more than 6/7 magma on the up ramp. Since the cart's loading already picks up one or two magma, normal liquid flow will normally put the up ramp under the threshold sooner or later. You could use other connections, but this setup allows to have a setup where carts enter from east and leave loaded to the west; without the impulse ramp in the trench, the cart could leave in either direction.
If you feed the trench with a pump, it could re-fill before the cart gets out of the trench. As far as i can tell, smashing extra carts into it doesn't reliably dislodge a "swamped" leading cart.
My favourite design uses a single-tile trench (which means there's no acceleration inside the loading tile):
##.## ##M##
╝D▼╝╝ ##═##
..... #####
z+1 z0
This requires two minecarts. The first must be dumped or otherwise brought to rest in the trench - just throwing it in from the east over the impulse ramps accelerates it too much - it will pass through the trench but won't pick up magma (too fast). When it stands still, it'll pick up magma, and when now another cart is smacked into it from the east, the cart inside the trench will leave - very slowly, gets accelerated by the impulse ramp to the west and moves on normally. The pushing cart will roll "down" the impulse ramp, with too little speed to make it back out of the magma, stands inside and picks up magma.
For testing, i sent the carts over a dumping track stop and cycled them back into the pit; they "pumped" one 2/7 bit of magma every 130 steps, which already overtaxed the supply of a long 1-wide feeding tunnel. Shutting the door at D stops the operation and primes the system for the next go: all you need to do is haul the "upside" cart (on the impulse ramp, unsuccessfully pushing the one inside the trench) back to a pushing route stop, open the door again, and give another push. That's also the easiest way to start the system for the first time - close door, throw in a cart, open door, throw in the other cart.
PS: and you can move your loaded minecarts up automatically, via
escalator, abusing the reverse of the impulse ramp bug - a long slope of single-connected ramps, which erroneously acts like flat track. Only consideration is that it only works with a very limited range of very low speeds. A dwarven push is just right, but a high-speed roller is already too fast. This takes a lot less construction and planning than impulse ramp or powered elevators, but the cart also takes quite a bit longer to arrive.