Bumber doesn't ramble as much as I do, and so covered the essential part of the below while I typed it...
Magma, unlike water, is unpressurized unless a pump creates pressure. That means it won't flow upwards when passing through a breach, even if you weren't at the top level.
I broadly use Ulfarr's method for magma forges by the magma sea. However, I'm a bit of a coward, so I add safety features:
- The magma isn't in a channel, but in a tunnel. I then make a hole in the roof of that tunnel for each workshop and place the workshops such as an impassable tile is on top of the hole.
- I add an outer drawbridge by the tile separating the tunnel from the magma. This two tile long drawbridge is magma safe and hooked up with a magma safe mechanism.
- Inside of that I add a wall grate (magma safe). won't stop building destroyers, but should delay them enough to crush them with the outer bridge.
- Inside of that I provide for the future addition of a magma stack (or pump, if at the top level of a volcano), should I feel a need to build one. This is done in the form of a hole in the roof covered with a magma safe floor grate.
- Inside of that I have a second drawbridge.
- Inside of that I have my magma loading station, for loading magma into mine carts. This is a 3 tile sideways branch of the magma tunnel with a hole in the roof in the magma tunnel itself and at the end of the side tunnel, covered by magma safe grates (this allows for the building of a screw pump in the two tile space between the grates).
- Inside of that I have a third drawbridge.
- Inside of that I have the magma for the workshops.
- I test the drawbridges when built to ensure they were indeed raising ones.
- Once tested, and the facilities above have been built i channel through the last tile to let the magma in, and immediately brick up or floor over the breach at the workshop level (in the case of a volcano it would have to be a wall, as it's open space outside).
- Once the magma facilities part of the setup is full of magma to at least 6/7 I close the third drawbridge, never to open it again (unless I expand, for some reason).
- The drawbridge outside of the magma loading station is opened after closing only if I run low of magma to load, which happens occasionally. It's closed again as the stock is replenished.
- The outermost drawbridge is opened of a pump stack is operated or the magma loading station needs to be topped up, but is closed otherwise.
There is also a somewhat exploity way of safely breaching into magma when you're not at the top level by (ab)using a ramp digging quirk. I've never used that method (I've haven't had the need since I heard of it: going for the top level has been sufficient for me so far).