Look up the 1989 earthquake. You'll see lots of photos of stick framed Victorians that failed. The highrises (which are designed to withstand earthquakes) are still here.
The ones in SOMA and the new UCSF campus are all built on land reclaimed from the bay. In other words, rubble. When an earthquake hits, they are within a liquifaction zone. This is a zone that during earthquakes, behaves a little like a liquid.
The buildings they are putting up there, however, have foundations drilled down so deep, they are well in to the bedrock below. They aren't going to come down.
I don't know how I feel about being on the street if that happens, though.
I've never thought of Tokyo as a tall city. The city-scape is generally max 6 story buildings. The tallest building in Tokyo is shorter than the tallest in San Francisco!
Tokyo achieves more density than San Francisco because the average street width is about 14 feet. San Francisco's is about 90 feet. That creates a lot more buildable land per block and less traffic.
The average building height is also about 3 stories instead of just over two in SF. The majority of housing is single family houses and owner occupied. And Toyko has much, much less parking.
The result is a comfortable, walkable city at double the density of SF without high-rises and with less traffic.
The key difference is that SF is planned, laid out, regulated, permitted, and platted very badly and Tokyo is planned well.
Also, the peninsula cities are required by law to sprawl at low density, constricting SF's ability to spread medium-density growth that would keep housing affordable. Any upzoning, even around transit stops, is blocked and housing supply remains severely limited.