The first part of my epiphany was that most wandering monsters should have source rooms. Alright, I had read this before and you have too, but while keying a dungeon, I went about enforcing this for once. It gets rid of the idea that there will always be monstrous centipedes even though your players have already rooted out their nests.
Something kept bugging me, however. When you encounter some giant rats in their room, there’s the whole lot of them, but elsewhere, there might be two or there might be seven or whatever. And especially I had an issue with one lone monster that was on the wandering monster table. I wanted it to move, and having it always show up in that room bothered me.
Or, in short, I wanted something like the One-Page Wilderness System that worked in a dungeon.
The lone monster was the easier problem to solve. For it, I just gave it a frequency of appearance roll in its own room. So, when the players go in that room, I roll 3d6 (GURPS habit to always use the d6; you could easily use another die, especially percentile) and if it goes under that number (typically 9 or 12), it’s there. If not, it’s wandering. This also is the way to handle monsters that stay together but still wander.
For gaggles of monsters that don’t stay together, this was trickier. I’ll copy a room key to show my solution:
There are 2d-4 doomchildren here. On a roll of less than 1, all are wandering; this room is the lair of 8.
That's 2d6-4, for those whose dice vary.
So now, most encounters in this room will not be with the full lot of eight doomchildren. There will be just three on average, and one-sixth of the time, there won’t be any. This makes it less certain that the players have cleared the room. On the flip side, you might need a higher maximum per room than before to keep up the challenge.
EDIT (27 June 2019): And reinforcements are coming.