I love mechanical traps, much more than magical traps. Mechanical traps are something the players can figure out, they don't require any hand-waviness or DM fiat, and it's a fun bit of mental engineering to put them together. They're a dungeon staple, and staple of movies, e.g. Raiders of the Lost Ark.
But, I wonder how they work behind the scenes.
There was an episode of X-Files that gave me a minor revelation about bowling allies. The alley, seen from the outside, ends at a wall of pins. In this episode of the X-Files (at least I think it was the X-Files, could've been something else, it was a long time ago), there was something behind the alley, and a worker was back there with all the machinery. Never mind the worker's horrible fate, the man had to deal with bowling shoes all day, he's really better off. What interested me was the fact that there was a giant clockwork mechanism behind the surface that the bowling alley patrons saw, responsible for moving all the balls along and setting up the pins.
Now, if the dungeon is full of all these traps, that are constantly resetting to nail the next foolish adventuring party, there must be vast flywheels, gears, and other bits of machinery driving the traps. Where are they? They never show up on a map. The answer is simple - the dungeon has secret levels you can't see. Levels between the levels. Levels full of vast spaces, acres of whirling wheels and chains.
But in the deeper levels, someone made a mistake. There's a crack. There's a way into the places between the levels. If the players are particularly unlucky, they'll find it, and they'll go inside.
Because somebody resets the traps. Somebody repairs the ancient columns supporting the thousand feet of stone above. Somebody winds those hidden flywheels. Somebody lives between the levels.