FWIW, I have found that CorrosionX, mentioned in previous posts on this forum, works extremely well at preventing corrosion. I have tried lacquers, potting, and various other methods, but have found this the most effective of all methods. It's messy, yes, but that's one of its benefits - it seeps into every crevice to seal against moisture.
As an extreme example, I have one device, which is a dosing pump to dose my man-made stream with algaecide, where I have an ESP8266 and various other electronics in the same enclosure as the pump. I had liberally coated the circuit boards and motor contacts when I assembled it and it has been operating reliably for the last two years. I was stunned, when I went to refill the tank at the end of summer to discover that the tubing fittings had leaked and the circuit board was actually partially covered in liquid (either condensation or algeacide, I don't know), but it was still operating without any sign of corrosion. Now THAT is protection!