We already have laws the prohibit people doing illegal things. Crime isn't exclusive to homelessness.
And i seem to remember public bathrooms near the bart stations. they were like temporary green plastic things. but sure the city should have more in general. those kinds of things help everybody