It's not like your average dungeon or lich cave has OSHA approved vents, fans or electric lighting. Your average party, without specific magical aid, is burning torches and lanterns in unventilated spaces.
ETA: if you're going to run carbon monoxide, etc rules, your supply shops should stock and recommend caged canaries to anyone buying large quantities of torches and lamp oil, dungeoneering/mining gear, etc. People would know about it and have figured out a primitive solution that merchants would be happy to capitalize on if this is an in-world issue.
Most underground lairs would have a draft so the air is viable. Because most things living underground, even in the underdark, need to breathe. Which is why liches and other intelligent undead would be so dangerous. They don't so they can build without concern for that.
Background was a cave system with very limited resources (previously few dead bodies to spare) and the Lich was both rather low on the power scale and Artificer-themed (so no "just spellcasting the party to death) and a Kobold.
So he fought/thought more like an engineer, not a powerful necromancer.
Highlights included:
Lair filled with Carbon Monoxide (I let the party notice symptoms and retreat, it was more of an area dental tool than a trap)
freezing the flooded exit tunnel so the party had to tunnel through ice, making them vulnerable to an ambush
installing an artifact that would flash-freeze said flooded tunnel with the party inside
a "main entry" labyrinth to the lair that was rigged to collapse
a side entry with a hidden, massive door that tried to crush the party and did manage to separate them
one-time sigils that would create a zone of Web, Darkness and, again, flash-freeze the intruders (and the undead defenders delaying them)
a remote body with his true body walled off in a tunnel behind the wall it can escape even if it loses
Seriously though I love your ideas. This is what really frustrates me about high level play. At that point your enemies aren't only powerful they tend to be incredibly intelligent. If you play your liches and dragons smart the party shouldn't even stand a chance unless they are overwhelmingly powerful or happen to catch the enemy way off guard.
Or perhaps I'm just not intelligent enough to make that work lol.
Hot take: if you as a DM pull something like this but aren't otherwise running a "survival" campaign with enforcement of other environment-related rules like encumberance and starvation, you're a jerk.
You can drop lots of hints, a perception check to notice the flame of their torches has diminished and is threatening to be extinguished. They start making con saves every 2 minutes, if they fail they get dizzy, subsequent failed saves cause headaches, then vomiting. Give them heal or wisdom checks for a chance to determine what's happening. After 3 failed checks you use the rules for holding your breath and party members with the lowest constitution begin to lose consciousness. Seems fair
I don’t think a potentially deadly concentration of carbon monoxide would displace enough oxygen for a flame to go out. The deadly part is that it makes your red blood cells useless once it binds to them.
The main symptom of CO poisoning is sleepiness. By the time you realise it you're just thinking to yourself I'm tired and I'm going to take a quick nap, then you never wake up.
CO2 poisoning is easy to spot because you're suddenly very breathless and hyperventilating for air.
This is because our respiration is controlled by the percentage of CO2 in our blood. Not by the amount of oxygen. So we actually don't react to most gases, we just KO and thats it. If no one removes you from that area, you're a goner.
In most cases they probably won't even notice what's going on, assuming they continue deeper down the dungeon they'll pass out before they figure out it's monoxide poisoning (if that concept is even known to anyone in the party)
How would you deal with this in 5e? From spells I'm seeing you've really only got water breathing and air bubble from spell jammer. It's a pretty classic dnd trope so I'm surprised there's no solution.
The Necklace of Adaptation is probably the best option. It’s an uncommon magical item from the DMG that requires attunement.
While wearing this necklace, you can breathe normally in any environment, and you have advantage on saving throws made against harmful gases and vapors (such as cloudkill and stinking cloud effects, inhaled poisons, and the breath weapons of some dragons).
Poison immunity wouldn't help, at best it would prevent the panic feeling and hallucinations caused by breathing in CO, but the lack of oxygen would still kill you.
Gust of Wind would probably work well too, at least for a good chunk of the dungeon. 60ft long 10ft wide for 1m. That's going to be a lot of airflow. It depends on if there's a constant source of carbon monoxide or if it's a limited amount that can be cleared eventually.
Vaguely reminiscent of the cursed mine my PCs will learn about someday. A simple mine, extracting silver, with a large amount of pitchblende. The corporate mine owners want to increase output from the mine, but miners experience curse-like symptoms when they stay there too long. It's a mystery why this cave in particular causes miners to feel fatigued at first, ending up with lesions on the skin and vomiting blood. Remove Curse doesn't seem to help at all, but for some reason a simple Lesser Restoration is enough to end the symptoms...
Ah yeah. Too used to pathfinder/3.5, so this would be an annoyance but as long as prep life bubble or have an oracle you’re fine lol. Not a spell that comes up a TON unless you’re going underground pretty deep.