My ten year old male or female children were not sent to public bathrooms alone... That was 20+ years ago.
See, there is the answer. Don’t allow children to use public restrooms and its a non-issue.
Thank you for your wise consul where it is so badly needed.
We had that same rule at our house. Always either accompany each other to public restrooms or stand outside the appropriate door and wait. I was more in fear of kidnappings which were all too frequent at that time than of sexual molestation. Now the concern would be for both.