Better to keep them well away from moisture, condensation, humidity, whatever. Salt spray especially, and the color of corrosion on the one looks like some salty residue was likely involved.
You may find a tighter, closed or even sealed, connector is better than open Fast-Ons. If the chassis can be made in such a way that drips don't enter, that's something. If airflow is mandatory, perhaps a fan and filter could be fitted, or larger external heatsinks used. There are rubber boots for Fast-Ons, but they don't really seal; might help a little.
All about how much cost-reliability tradeoff your application has available.
Tim