...
heaven forbid the idea of some of their mounts swimming up into the cistern.
Put a fortification or two in the line somewhere, just like you use to keep the magma creatures out of the foundry.
To modify for creatures that survive being covered in water, put in spike traps.
Or get dwarven...
To clarify: magma on z-2 will melt an ice wall on z-1, but not a ice floor on z? Magma on z+1 will melt an ice wall and ice floor on z, but nothing on z-1? Ice will freeze if the tile is Inside, Above Ground, provided that nothing melts it?
I don't have a fort situated so as to check: If you have magma at z+1 and ice wall at z-1, do you keep an ice florr at z, or not?
If not, you need a path like the drowning trap above, but Aboveground, with magma on at z-2, just sitting there. That keeps the z-1 level liquid, but z still has an ice floor, so is "Safe".
To trigger, pump the magma into a constructed basin at z+1. Floor melts, enemies fall down into the hot tub. Pump the magma out of z-2, and they become encased in ice.
If the magma at z+1 doesn't melt the floor at z while the wall is there at z-1, leave the magma at z+1, and cycle it at z-2 to operate the trap.
What I don't see is a way to do this without any magma-proof mechanisms and hatch covers, without letting some magma evaporate after each cycle. I think it is possible, but would need a lot of pumps in a setup similar to the original.