Actually, I think those were the lightweight zinc locknuts. Steel ones would have lasted a bit better, as suggested by the lack of rust on the body of the connector.
Part of that can be attributed to the zinc sacrificing itself to protect the steel .... a principle every boater is familiar with.
I note that both pieces of flex have pulled free. This suggests that they need some additional support - or were simply too short from the start.
It's a critical part of an electrician's job to judge the environment. The code does require that equipment be suitable, both for corrosion resistance as well as mechanical damage; these factors may require you to do things a bit different that "the way we've always done it."
Even Chicago, which wants to see nearly everything in steel pipe, and does not recognize PVC pipe or romex as wiring methods, will allow the use of PVC where corrosion is an issue. Indeed, in appropriate circumstances (in my experience), Chicago will allow an exceptional amount of creativity in meeting the threat.
BTW, if you do find yourself working in a corrosive environment, it will help you greatly if you coat your threads with Noalox, or a similar product. This will keep everything from rusting together - and is even listed for that use.