I uh... never got to fully use my back-up defense.
Largest siege was about 5 years in and I think it was like 80 gobs and trolls total, my military at the time had been training for a while, the civvies were all in civilian leather+crossbow or hammer uniforms, and despite having the military stay up on the entrance platform and letting the gobs come to them, Mr. McLegendary and his squad still ended up battling their way down the stairs, past the elevated wagon access (in case of magma flooding) and up next to the open-air cisterns for the dual pump-stack.
(http://i.imgur.com/TNjDP4j.png)
Worth noting that the troll way to the left by itself didn't come from that direction (the walls direct the magma northward into the forests that way) as invasions tended to come from the southwest, he was actually part of the group making up the trail of bodies down there but one dorf grabbed him by his ear and threw him somehow, earning the name and job Urist McTyson, Trollbiter from me.
I came back with McLegendary and his wife later and activated the pumpstacks while dropping the pistons because why not... there's no place like home:
(http://i.imgur.com/N8ahMxF.png)
There are a couple of bait targets for trolls that I was gonna test out early on, having a weapon rack and armor stand behind fortifications to see if building destroyers would try to get to them. Turned out the nearby gobs were pretty far away after all.
The two structures to the left and right in the flooded screenshot are the exits for the pumpstacks which link to a set of axles hooked to a 4 wheel reactor. Since the reactor wouldn't shut off even if I closed the hatch over the feed tile I linked a gear from the two axles to a set of rooms full of gears and pumps that suck down enough power to kill it when hooked up.
The pumps themselves draw from a cistern around the forge level which was filled by the volcano, with back-up reservoirs above-ground surrounded by fortifications because it looks cool and I got bored waiting for the gobs to arrive, which is the main problem with not using a military at all... a clean trap corridor is just depressing, a clean military can still be hurled at hell or something.
While I mainly use a military for the surface attacks, I go with an automatic cage trap system for the caverns.
My comment as a complete description of it, but to summarize it there are two main lines of capture; the initial basic cage hall & the building destroyer halls. A silk-cage trap hall is added later when a GCS or a web FB is caught.
Here is my current trap system, with 8 captive FB's.
Z=+1 Water cells above each FB holding cell of the trap, and levers for controlled refilling/draining.
(http://i.imgur.com/KyB1ZQM.jpg)
Z=0 Cage hall for cageable cave beasties, building destroyer cells for FB's, and a web trap for cleanup.
(http://imgur.com/WWOxvoO.jpg)
Z=-1(http://i.imgur.com/Q5BBEcz.jpg)
It's not for every fort, but it does it's job very well.
And here is a gif from a prior fort of the system in action.
(http://imgur.com/TnJTzNO.gif)
When the floodgate is destroyed, water pours down onto the pressure plate below, triggering the drawbridges to close the cell.
That said, I have been meaning to experiment more with powered minecart halls. I previously tried a few times in DF2012 to get a minecart water shotgun to work (never succeeded) and I did get an impulse ramp grinder working a few times. I found cleanup on those systems to be a bear though. Last one I got to work in DF2012 worked great for the first few sieges, then I could not for the life of me find the proverbial sock: I watched helplessly as my entire fort walked into the grinder.
I think I need to work more with magma. I hear it does wonders.
I have a good trap to offer. Maybe I can do proper !!science!! after all?
1. Magma trench, no ramps at z-2
2. Minecart circuit, with some speed regulation both against too high speeds, i.e. cart jumps over the whole trench, and too low speeds, i.e. minecart falls into trench, z-1
3. Invader path at z+0 (next to the magma trench, so I did in the prototype)
When activated the minecart circulates, bouncing off the magma a few times per round, producing steady magma mist each time it bounces.
This trap design is certified as energy class A+, since no (?) magma is wasted. (It certainly works with the amount of magma, my slow minecart magma lift can handle.)
I have a working prototype, but the speed regulation is still somewhat whacky.
(http://i.imgur.com/aVOeaR7.png)
Image of z-1. (Used dfhack map reveal to find enough material for my colour coding needs.)
Edit: While this works with a holding area, where enemies are exposed for a while, it is likely not working that great for 3 wide bridges or so, like magma mist traps with submerged minecarts bouncing around.