Iron menacing spikes. You need a one-tile wide corridor, maybe ten long (you can make it winding, to slow down invaders even more), stick a cluster of 4+ spikes in each tile, hook 'em up to a repeater. It's totally unimpressed by trapavoiders and never fully jams. Occasionally, you'll get a weaponmaster or roc who dodges them all, but two or three weapon or cage traps are adequate to catch those. 40 spikes should be enough, preferably metal and of high quality.
My most recent experience was with a powered minecart grinder, which was even cheaper in metal - six carts (twelve metal bars, all of non-weapon types) and 30 native gold boulders (could be replaced by other heavy stone, but native gold is highly recommended - 2000kg each; if your site has gold, procuring those will be easy enough, otherwise, import them from the dwarven caravan). And it's hilariously oversized - nothing, including the cave dragon siege, has gotten past the third cart, so four carts and twenty boulders should be adequate. Once they get hit, they get swept aside and kept in permanent hit/stun lock. Nothing can move, building destroyers can't do their thing, everything expires from terrifying blunt damage. Efficiency is limited by cart weight vs. creature weight - for megabeasts, you might need to stick minecarts full of gould boulders into your minecarts, matrjoschka-style.
Re: dragon - i'd commemorate the dragon by having the bones made into an artefact and creating a lot of dragon soap. One should give about a hundred bars of soap, enough to build a little memorial.