It turns out there is a little problem with this dodge/fall platform setup - it is so lethal that it kills too many enemies and the siege breaks before very many of them even get up on the catwalk. Hilarious to see it happen though
You need to set up a one-way door before they get to the catwalk area so there's nowhere else for them to go. Channel them through an area like this:
-----------
bbbHp ^
-----------
- = walls
b = retractable bridge over channel
H = hatch over a channel
p = pressure plate that triggers on anything but dwarves
^ = ramp back up from channel under bridge and hatch
Remove all the ramps from the channel except the one escape ramp. Once the invaders pass it, trying to go the other way opens the hatch, exposes the pit and makes it uncrossable. The only way is across your ramp.
The bridge you can pull for building destroyers - dig a channel under it that leads to the other side of the trap. Building destroyer lines up to bust the hatch, pull the bridge and he falls into the channel. Put the bridge back for the next bunch. You can't always get the bridge out of the way, and a busted hatch makes the path permanently unpassable, so I usually use two or three setups in parallel so that at least one usually stays intact.
Whatever deathtrap mechanism I have set up at the time is always entered through one of these. And far enough away that a majority of the siege will be trapped by the time the first ones start dying. It's much more fun to see 50 goblins get chopped/smushed/eaten/boiled/drowned/etc than only to the first 10 and have the rest run away.