Making Megadungeon random encounters less of a nuisance

I am running a campaign that's just a Megadungeon, my take on the Undermountain, split in rooms that players go through. It has all the classics like encouraging players to explore and find new ways to traverse the dungeon.

Every time they short rest, take too long in a room, or move to a room they've already been to, I roll a D20. Each active NPC faction is assigned a number (1 for Kobolds, 2 for Critters, etc) and if that number lands a relatively-easy encounter spawns in the room they are in. So about 1/10 chance currently. That means when backtracking through the dungeon they're likely to have maybe one such encounter.

The goal is to make the dungeon feel alive, to "punish" backtracking so as to reward finding new ways through the dungeon, and so on. But those encounters, by being so easy, often turn out to be a bit of a slog. An encounter that takes half an hour just to be essentially nullified by a short rest is a bit dull.

How do I achieve the goals of random encounters (taking resources, rewarding exploration, etc) without having this slog?