Was there a possibility of finding a cafe or Macdonalds and just buying a coffee or something so you could use their restrooms? (as you said you were making 6+ figures) I mean I imagine that would be preferable to pooping on the street. But I don't know San Francisco, was there a reason why that wasn't possible e.g. no cafes open or something?
Starbucks the world over. If they might give you any trouble, stare vaguely at the menu on the way in. One can always change their mind to not order something on the way out.
Starbucks has restroom codes in large cities with homeless populations. They won't give out unless you buy something.
One of the Boulder Colorado Starbucks has a biohazard needle disposal box. Either that's for people with diabetes or there a high population of IV drug users.