You are advancing along a 5ft wide passage and come to a side door. Ahead is a dead end. The side door opens to reveal a 10ft square room with an exit on the far side. The room is occupied by a Marilith. Seeing you, it flourishes several wicked-looking scimitars and hisses evilly.
Roll for initiative.
Exactly. Also; the thing has truesight and immunity to poison.
'Suddenly a 30' wide secret door (DC: Passive perception of highest PC +1) opens next to you, briefly revealing a 30 x 30' space behind with a large multiarmed snake like creature within. Simulatanously, a porticullus drops both behind and in front of you in the corridor you cutting you off from retreat, and a cloud of magical darkness drops over you all blacking out all sight. You all smell a foul stink of gas. Also, an evil hissing eminates from within the room (Warlock, you can see it). Roll initiative'
I'm struggling to see how this is particularly hard to do as a DM.
The marilith has truseight so magical darkness and invisibility dont bother it. Also, a poisonous fog encloses the area forcing con saves from everyone or be poisoned and take 4d6 poison damage (save for half and no condition). Mariliths are immune to poison (and the condition). A PC who specifically states they hold their breath gets advantage on the saves.
A Marilith is CR16 so its a decent 'hard' challenge (15 percent of resources blown) for a party of 5 x 11th level PCs. The addition of the darkness and poison bumps that encounter up to 'deadly' however. The monster hasnt been touched.
On turn 1 it slithers over to the archer, and rips his face off (7 attacks at +9 with advantage, inclduing restraining him with the tail). It parries melee attacks at AC 23, cant be targeted with AoO or most spells (unless you can see it) and if it does get caught in an effect, makes saves at Str +9, Dex +5, Con +10, Wis +8, Int +4, Cha +10 with advantage due to magic resistance. You cant trap in a wall of force because it can teleport.
If 'uber optimised tactical PC's are a thing, so are 'uber nasty optimised encounters'.