I build my forts with as many planes of symmetry as possible, down to the placement of the stairs, and have been working on making the core of the fort as small as possible. Beyond that, I build as many trap-filled corridors with as much automation as possible. It's not out of the question for me to have fivefold redundancy on my entry corridor sections, each of which will seal itself off, flood itself with magma, drain itself, then open itself to be cleaned should a goblin reach the pressure plate at the end. Five of these corridor quintets in sequence form the first rung of my defenses. At the end of the gauntlet of goblin blenders and fluid traps following those, my entire fort core is suspended over magma from supports that will collapse should a non-citizen manage to reach any of the staircases leading down into the fort corners.
Naturally, this fort core has eight redundant backups arrayed in a 3x3 box. Each is also surrounded by magma until the previous fort core is terminated (which automatically drains the magma from the entryways into the next core), and stocked with a married pair of dwarves and a cache of supplies (and farmland) so they can live out the automated obsidian farm recasting the destroyed fort core(s) and go dig them out.
I'm paranoid-anal.