I had a serious problem with fingernail biting prior to going on my first Navy cruise. My Youngster Cruise as a USNA midshipman found me working in the main engine room of the USS Coronado, LPD 11. I got along well with the snipes: my size meant that I was small enough to scrape down the inside of the firebox ... and they also taught me how to disassemble and repair bilge pumps.
After my first day with my hands in the bilge sludge up to the elbows, I never had a problem with biting my fingernails again ...
I would scub a firebox or crankcase over the bilge any day of the week.