For the railway industry, I use a "breathing" device. It is like an M12 bolt, with integrated Goretex membrane. It let the ROSE enclosure breathe and expell humidity due to temperature changes.
And the pcb is also coated.
All our PCBs over the last 40 years have been treated with a MIL-V-173 conformal coating varnish that holds up for years. Just completing a new design that uses the Teensy 4.1 instead of a simple uC and realized that the mother board it...