Side view:
≈█_______ Workshop level
≈█#%%≈≈≈≈ Magma reservoir level
≈╬▲██████ Breach level (magma pipe or sea)
≈████████
# - Floor grate
%% - Screw pump (access not depicted, pump from left.)
Carving fortification prevents risk of losing a pickaxe, floor grate prevents incursion, screw pump pressurizes magma for fast filling. IDK if building destroyers can break a floor grate with a path to the top, but I keep the door to the pump locked when not in use.
Floor grate is a building. If they can break a worshop's impassable tile, they can break a grate.
They can break the door, too - a lever-operated bridge makes a better lockdown. And they can break the pump, so its output channel needs lockdown too. Fortifications still allow critters to go through in some cases, such as with flow at 7/7 - which is exactly what happens while the pump is active. Perhaps smoothed walls will be better - a critter may fail to climb out, at least for a while, or even path through:
top:
≈████████
≈██...B.ò
≈██^█████
≈█#÷%≈B≈≈
≈████████
side:
█████_______
≈████#÷%≈B≈≈
≈▲Bb╬_██████
≈███████████
b - bridge
B - raised
ò - lever
^ - place for "running away!" pressure plate if you want something trickier.
walled-out service staircases/ramps aren't shown.
But no lockdowns allow to avoid the flow, of course. An amusing option would be to have a retractable-bridge pit under the grate (where you have that ramp), activated by pressure plate right next to the pump - i.e. where the civilian dorf from the pump tile will run upon seeing a monster below. In which case you may want magma-side lockdown (e.g.1x2 bridge raising left, next to fortification) to be on a trigger, either RS (needs delay or alternate path to reach the pump without triggering) ot flip-flop (opens when the pumping dwarf goes in, closes when he leaves).
Maybe even with back flush - once you got magma in tunnel to the right, you only need a valve set under the pump to create flow to the left for a little while (if you can make that secure, which needs a fortification and checking fluid levels). Opening a pit (with evaporation area somewhere when it won't be a trouble) would create a low magma level for the flow, possibly.
top:
≈███████████████████
≈██,,,,,,O,,B.ò.òò
≈██,██████^█████████
≈██▼█████#÷%≈≈≈#≈B≈≈
≈███████████████████
side:
0≈█_______________
1≈█_█████#÷%≈≈≈#≈B
2≈≈▲Bb╬bb^≈╬≡X≡≈^█
3≈█████..█████████
1: Floor Grate, Pump, Floor grate (filter), bridge:raise:W
(Lockdown!) - the only floor-less tiles are floor grates
2: bridge:raise:W
(Lockdown!), fortification, bridge:retract:W(pit!), Plate:5/7-
(CanFlush?1), fortification, Door
(CanFlush?1), Floodgate
(CanFlush?2), Door (Flush!), Plate:6/7+
(CanFlush?2)3: pit
"pit!" and "flush!" controls can be activated both via access passage pressure plate, perhap with their own levers for troubleshooting.