I am not in the camp of nylocs are bad on battery terminals and this example showed that the failure mode was not the nyloc. I could not back this nut off with my fingers even after it was loosened with a wrench. The plastic battery case melted well before the nyloc failed to "loc".
Battery cases are polypropylene and nylocs are nylon which has a higher melting point than the battery case.
I do prefer to see a locking washer on battery post studs but sometimes they simply don't fit, but a nyloc may. In either case the nut MUST be properly torqued, this one was not. The nut coming loose or vibrating loose was not the problem or the root issue here. This problem was simply poor installation practices.
The issues were:
#1 The nyloc nut was not correctly torqued and showed evidence of pliers being used for tightening.
#2 The lug had a SS flat washer placed UNDER it. A flat washer should NEVER be inserted between the lug and battery terminal. It is perfectly okay to use it under the nut, but on top of the lug, but NEVER underneath the lug.