Potting seems like not a good idea for board-to-board (pluggable) headers. If they're soldered on both ends, that would be fine. (And, uh, it's not like you'll be wanting to dig out all that potting just to get at the lower board, anyway, right? Right?...)
Sealed enclosures are good, but mind they are still permeable -- air and moisture will diffuse into them. Conformal coating for the boards, and corrosion-resistant platings for connectors (e.g., 1µm gold, not just flash?), are good ideas.
Careful washing of the PCB assemblies will also help reduce electrolysis. It's fine if water condenses on the board and it's not conductive enough to cause a problem. But it is a problem if it condenses there, and dissolves salts and fluxes sitting on the board already.
The gold standard, more or less -- typical for avionics (flight instruments) -- is a hermetically sealed metal enclosure. Fused ceramic/glass feedthrus are used for connectors, and soldered metal joints are used to close the assembly. The enclosure is purged with dry nitrogen gas, and the cover is soldered on (usually all at once, with an induction heater). Or there may be a gas fitting, so it can be sealed, then vacuumed, heated (baked out), and back-filled with inert gas. Or just left at vacuum, for some instruments (refrigerated cameras, for example, or physics apparatus).
Tim