This is part of the Megadungeon Best Practices series, linked here.
This one might seem pretty obvious, but it's nonetheless a good "best practice."
Use Multi-Room Encounters
A megadungeon is by definition, big. Big enough that monsters, factions of monsters, and even adventurers can spread out and still leave some no-man's land between their areas. Partly because of this, encounters can spread across multiple rooms - it doesn't need to be one door, one room, one monster.
Spread out bits of a single treasure (or a single failed adventuring group, or whatever) across multiple rooms.
A room with pieces you need to fetch from other places in order to complete a puzzle, a dorm complex with assorted connected rooms, a series of temples to different aspects of the same god, etc. - all of these leverage the megadungeon's size so going into one room opens up the possibility if not need to go into other rooms.
Corollary: Use Multi-Room Monsters
Monsters don't need to all hang out together in one room. Obvious, but still, it's something I sometimes forget. When you place monsters, sit back and look at the map for a while and figure out where they might hang out, move around, and who/what they might interact with.
Here are a few ways you can do this:
The Group - the monsters form a group, just geographically spread out. They will act as a group against attackers. This may be intelligent and coordinated, or a chaotic mob, or just all-out rout and return after the PCs leave the area. Groups can be homogenous (a hobgoblin tribe, a pack of phase spiders) or heterogeneous (orcs and their ogre allies, trolls and their pet lizards, etc.)
Bait Monsters - the monsters in one area are bait for another. Different from guards, these monsters are really just there to draw attention while the "main" monsters decide when, if, and how to wade in and attack you. These monsters, especially if set as guards, are likely to be in a position that makes them look vulnerable, wealthy, or otherwise important to clear out.
Opportunists - Some monsters aren't affiliated with anyone, but rather are ready to jump in to a fight if they feel like they have a chance to profit. They may be in the area on purpose or just wander in.