You could build a cage trap from the ground, it is a cage with the roof swung down to the side, it shoots up from the ground, via concealed grooves, at a certain height, after the roof has cleared the ground, a tether to the ground is pulled tight and pulls the roof so that it swings onto the top of the cage and locks into place.
Rocks can be suspended from the ground, they can be seen, obviously, but they could be designed to only be accessible from one side, if the enemy reaches that side then they just kick it over(unless the building is indestructible, which they probably would be at present...), or they can try to disable it by throwing stuff. But if it comes to it, you can place multiple redundant triggers, deceptive release mechanisms, multiple rocks, and all manner of things you could think up if you were actually designing one, and have something with a reasonable chance of hitting someone with a rock if they stepped on a nearby piece of ground. Anything that doesn't 'get' the stone-suspended-in-the-air mechanisms may just walk under it regardless, and goblins may prefer to charge the obvious trap rather than face the penalty for cowardice.(which gets rapidly worse after they are recovered from the pit filled with tentacle demons...)
As for a repeating trap, assuming you have a constantly rotating axle. You can have a spike attached to a pressure plate. The pressure plate pulls the spike out of a gear, that otherwise holds the axe in place. The spike is only retracted at the specified pressure and a spring returns it after the pressure changes, the axe returns to the gear and cannot pass due to the spike.
As for the axle, you could link it to a battery, such as a suspended rock. When the rock reaches the bottom of it's track, it lands on a pressure plate which disengages the axe mechanism, and engages the axle. The rock is lifted to the top of it's track, at which point it disengages the axle and engages the axe, off the top of my head I am not quite certain how to do this, but I have gotten far enough that I am confident that I could figure it out given time, and I suspect that dwarves know more about gears than I do...
I am sure there are better ways of doing it, but I just wanted to suggest that someone with absolutely no background in engineering can find a solution. Bear in mind that there have been some exceedingly complex mechanisms made throughout history. Including a doll that could write(or was that one a hoax, I can never remember... Regardless, some of those things were real and fantastic...), and I heard that, hmmm, I think that the romans may have had a repeating ballista that would keep firing so long as some sort of crank was turned or something...
Traps should probably be less powerful than dwarves. It is possible to have a mechanism that hooks a weapon up to anything. Hook it up to something heavy enough and you could easily have a mechanism that could snap a solid steel axe in two rather than get jammed. But such things require space and to keep it compact they are probably not that forceful, so reducing the damage from traps seems reasonable. I could see the victim evading a trap to some extent, and if they have alot of room then dodging should be quite likely. But mostly I would like to see enemies having more options for trap resistance than simple trap avoid...
It would probably help to look at the mechanics suggestion thread, there are some related ideas there. I would like to see power being generated from levers, and power being universal, so that you could have your traps powered by a waterwheel or by a bunch of dwarves all pulling levers or have one super-dwarf powering a bunch of traps, and have bridges that require several dwarves to lift... And, of course, some traps don't require power, a simple hole in the ground doesn't require anything more than camouflage and a reason to walk over it...