ETA partly ninja’d by excellent Chronos.
There are lots of interesting physics in the stuff you describe. And several disconnected ideas that you’ve mistakenly glued all together.
Let’s start with a couple of basics and see what you think. Everything I’m saying is simplified a bunch and ignores a lot of details.
Idea 1:
There’s a basic relationship with gases that PV=nRT or with some algebra PV/T=nR. Where P means pressure, V means volume and T means temperature. You can think of nR as how much gas is actually there.
If we put a bunch of gas in a sealed container then nR is a constant. So whatever we do next, PV/T is also constant.
If we heat it, T gets bigger. If we double T then to keep PV/T the same, that means PV has to double as well. Which can either be the pressure increasing; pushing harder on the sealed container walls, or volume increasing, like a sealed elastic balloon expanding, or some combo of both.
Likewise if we start from a steady state and squish the volume, pressure goes up and or temperature goes up to keep PV/T constant.
Next idea.
The atmosphere is not in a sealed container. The pressure we feel at sea level (14.7 psi officially) is the result of all the air stacked up to the “top” of the atmosphere 100ish miles up. Because air is compressible there’s more air molecules in a cubic foot of air at sea level than on Everest. If you make a tall stack of books, the bottom book is more squeezed than the top one. Pretty obvious. If you made a tall stack of real soft squooshy foam pillows, the bottom one would be squished much flatter than the second from the top one. Gas is the squooshiest of squooshy foam pillows. So the bottom layers of a gas are lots compressed versus layers near the top.
If you climb Everest the air is less dense; there’s less air per cubic foot. The air is also under less pressure since there’s so much less above you pushing down on the air where you are. For real round numbers on Everest you’re above 90% of the air, even though you’re only 6 miles above sea level and the atmosphere extends up to around 100 miles before it gets really, really negligibly thin. You’ve covered 6/100ths of the distance to the “top” and you’re above 90/100ths of the gas already.
Next idea.
The atmosphere is heated by the Sun. But what really happens is the light and heat flow down through the atmosphere without heating it hardly at all. The light and heat from the sun then heat the land and the sea. Those things in turn heat the air. So like a pot on a stove, the atmosphere is heated from below, not from above. Which is why it’s hotter at sea level and colder on a mountain top.