I'm planning on developing a fully-functioning fortress with engineering defenses instead of a military. I'll be isolating a select few dwarves for
isolation training. Once the fortress has reached a point where it can easily deal with sieges, I'll remove and dump all of the furniture (beds, tables, thrones, etc.) into an isolated area. If ghosts hang out only around meeting areas, then I'll also disassemble their tombstones/slabs. The meeting area will be filled with upright spike traps, so all other dwarves will inevitably die horrible deaths.
Another idea is to have a long and narrow corridor between the dining hall and the food stores. When a dwarf goes for food they step on a pressure plate that triggers floodgates to seal them in. Then it's either magma from above or spike traps from below. If the magma route, then resetting will involve retractable bridges to atomsmash everything.
Third idea involves controlled starvation. Since tallow and seeds can be cooked into meals, portions can be controlled. Dropping the tallow/seeds so access is only available to a Test Subject (referenced above) who then cooks them into a biscuit (two-item roast) and then drops the tallow biscuit into the food stores for the rest of the dwarves. Limit the number of available biscuit stacks to one-third of the current population (so two-thirds of the dwarven population can eat). Keep the biscuits on the other side of a bridge+moat so that dwarves have no access to it. Then, once per season, drop the bridge.