I stopped biting my fingernails in high school when I viewed one under a microscope in science class. Washing your hands likely won't get rid of all the gross stuff on your nail that you won't want in your mouth, especially your gums, which are especially susceptible to bacteria and infection. You might need to gross yourself out with the reality of that to get yourself to stop using a fingernail.
If you can't stop the desire to "floss" that much, maybe at least carry disposable floss around with you and use that instead.
There might be a different, less dangerous sensation you can find instead. Chewing gum?