I had an idea in a dream where a pressure vessel had a buoyancy valve at the lowest point. The idea was that a ball would sit in a hole and water that may condense inside the vessel would lift the ball allowing the water to drain after which the pressure of the vessel would seal the ball back into place. That made me wonder about the possibility of a pressure based buoyancy valve and whether the physics were there.
What you’re describing sounds very much like a condensation drain in a steam system.
or a steam trap
https://en.wikipedia.org/wiki/Steam_trap