Up front, yes, we need to be compassionate to these people (and they are people) and remember that if you're posting on HN odds are you're fortunate enough to extend a helping hand once in a while.
But we cannot sacrifice the city's quality of life by enabling behaviors that endanger these people and others. That's what we're doing right now. Explicitly. There's no "how do we engineer our way out of this problem" by way of designing some new novel public bathroom. Reinventing the urinal isn't a solution to this - it isn't even a bandaid. What's worse, more public bathrooms seems extremely likely to encourage a spiral of dangerous behavior to an increasing degree. We'd just move it from the streets and concentrate it in public spaces that are no longer really public, but rather are just bio-hazardous dorms for the homeless and addicted. Elsewhere in this thread, someone noted that SF essentially already has a pseudo-UBI program for the homeless. This seems patently absurd to me. Forget about this being a literal cash transfer to drug dealers, giving an addict cash is actually worse than just giving them drugs - now they have to go out and score, endangering themselves and very likely others around them.
So what is to be done? First we have to be honest. The overwhelming majority of these people are no longer "down on their luck". They're addicts, with severe mental health issues and no amount of "nudges" will make them change their behavior. We should start with diverting all this money that goes to nebulous initiatives like "housing" and these cash give-aways into funding legitimate facilities staffed with case workers, doctors, job trainers, and police.
And then we should make vagrancy illegal.
I don't say this lightly, as I've had a family member die from opioid addiction. But so many of these people have lost their own agency. They no longer have the ability to care for themselves. If the state doesn't step in, they will be next on the gurney - and everyone here knows it. You know it when you walk past the guy shooting up on the sidewalk on the way home from work. You know it when you see the woman with that "look" holding a sign that says "7 months pregnant, terrified, anything will help". We can stand idle and watch this happen, like we have for so many years. Or we can swallow our pride and realize that this system we've set up out of "compassion" is fundamentally broken and is at its root enabling severe problems - and end it.