i wonder if you could make your dwarven railgun self-reload. what happens if a cart gets launched and slams into a wall... does it just drop onto stuff below, wheels down? (ie, will it land on a track?)
if so, you could design a long entry hallway, send a cart (or 3 carts, side by side, or a series of carts, 3 carts across, for a trade entrance), have the railgun opening at one end, and a hole at the other end, which can drop the cart onto rollers. the cart would then simply loop back around and up two stories, then drop down another hole into your acceleration track (onto another roller, of course).
of course, that will call for a few more windmills (or perhaps just use dwarven perpetual motion machines), but uhhh... self-reloading dwarven railgun sounds like it would be worth it. (also, depending on what happens with the corpses, you should either get a location where you can seal off the railgun to prevent it from firing, and loot the corpses, or maybe wind up with cartloads full of your enemyes' corpses that you use to crush your other enemies. what's not to like?)
of course, i haven't really tested any of this... but i can always *hope* it will work