Public pay toilets are indeed the best answer.
When I was a child (I am in my 60s) there were pay-toilets all across the country, especially at family themed restaurants. If I recall correctly, it was taken to court and the courts said that those toilets open to the public could not be pay-toilets. The reason I recall this is my mother was frustrated keeping dimes (or perhaps nickels) on hand for 5 children and was thrilled at no longer having to keep that much change in her purse.