I’ve lived in SF twice and in a few other Bay Area cities, and I honestly can’t tell you that my personal experience with crime in SF is all that different from the norm in most urban areas.
There are places I’ve lived which seem devoid of crime, but these places seem to have more community in common than leadership or laws.
Although I’ve experienced crime, I also know that the level of crime, violent or not, has dramatically dropped over my lifetime and the probability of experiencing it is greatly reduced by living in densely populated areas.