Even stainless steel will probably fail in the ocean. The sea is an absurdly harsh environment. Look up sacrificial anodes or ultra high corrosion resistant alloys to get an idea of what you need to keep stuff going even for just a few years.
We had a monitoring unit in a heavy aluminum box on a buoy a couple km off Biscay (the HARSHLab, heh...) that lasted half a year, until the stainless bolts corroded against the aluminum and the lid flew right off. Polycarbonate boxes have worked better for us.