Yep, sounds about right. If you're a tourist, though, I would say that restrooms are accessible to a similar extent as any European city I've traveled to. They're perhaps more likely to be disgusting if you're in the worst parts of the city. Decent venues stay on top of it, though, and any place with a counter to order from will have a code you need to ask for to gain access.
If you're a local, there's of course social engineering tricks you can use, like going into a branch of your bank to make a withdrawal, then asking to use their bathroom.
And the quiet part that isn't spoken of is that all these businesses HAVE to have restrooms for their employees; and if you are nice and (basically not visibly homeless) and nobody is looking, you can often get access to them "as a favor".
Restrooms are the first victim of the tragedy of the commons.
If you're a local, there's of course social engineering tricks you can use, like going into a branch of your bank to make a withdrawal, then asking to use their bathroom.