They came up with a simple little device called the Anti Vacuum Valve, that vented the boiler during the night as the the machine cooled down, and then as the pressure built up in the
boiler, the valve closed itself.
As with all things, they do come in various shapes and sizes, some very high end machines might use an electrical valve to vent the machine.