The real problem is the combined sewer system, sewage and storm water. Smells will always emanate from sewage but most sewer systems are closed except at stand pipes that vent overhead into the atmosphere.
I live across the bay. We do not have a combined system and we don’t have odor problems related to low flows.
SF has an open sewer system to allow storm water to flow into it. The smell is coming from the storm drains which are connected to the sewer system.
Older cities are more prone to have combined sewers.