I usually resist wading into these types of discussions, but seriously, if you want to compare 3rd world with 1st world, don’t be surprised by the content.
I’m a South African (Married an English rose). You cant beat SA for quality of life, but the standard of living is very different. Cape Town is indeed in a bubble compared to most other cities for a number of political and socioeconomic reasons.
You take the same precautions in SA that you would take in any other foreign country. Are the risks of being exposed to violence higher? Of course, but lets not throw proverbial baby out with the bathwater. There are horror stories in every area, in every country.
Go, make the most of it. Don’t take the security issue for granted, but don’t let it overshadow you experience of one of the most diverse and beautiful countries in the world.