"There's a straightforward way to avoid false accusations. Behave in a manner such that nobody believes you're capable of anything you're accused of. It turns out that people predisposed to inappropriate behaviour generally manage to creep out other people beforehand."
In Denmark where I live, for the last couple of years we've had quite a high focus on peadophilia in daycare centers, sports communities, boy scouts, etc. Since peadophilia is such a horrible crime and so hard to prove conclusively in a court, an accusation of peadophilia is enough to ruin a persons life, even though the accused is acquitted in court. This leads to a situation where men I know refuse to do paid or charity work in these settings, for the fear of being accused of touching the children.
Behaving in a manner such that nobody believes you're capable of anything you're accused of is not necessarily as straightforward as you say.