Caves can have high concentration of $\rm CO_2$ and cause suffocation. I thought it's because the denser $\rm CO_2$ displaces Oxygen in lower ground. However, in a typical daily condition where both are nearly ideal gas, their spatial distribution should be decided by a boltzmann factor $e^{-\beta m g h}$ and should be independent of each other. The oxygen concentration per volume should be independent of $\rm CO_2$, but pressure is increased with more $\rm CO_2$ (which can messed up pressure-dependent respiration processes).
Is this line of reasoning correct? I'm a bit unsure about this because the CO2-displacing-oxygen argument sounds familiar to me.
Another example is that googling "why firefighters use $\rm CO_2$ to distinguish fire" gives results "Carbon dioxide is denser than oxygen. So when you spray the carbon dioxide on fire, it sinks under the oxygen, separating the fire from oxygen". Assuming the searched answer is correct (decreasing temperature from liquid $\rm CO_2$ is not necessary). Then it seems to contradict the idea that both O2 and CO2 are ideal gas in typical condition.