For general public restrooms, you can also search OpenStreetMap for amenity=toilet and access=yes (which means explicitly open to the public; see also access=customers). Try it: https://overpass-turbo.eu/s/1ORn
Can't imagine living without it.
Always wondered why Google has not done anything similar.