If you use a closed-cell foam and coat the metal below, it would hold any moisture. Closed-cell foam is what they use to make boats out of and won't inherently hold moisture. Still, the prudent thing to do would be to encapsulate BEFORE foam coating, which further ensures moisture protection...