I’ve never lived in South Africa, but I have two South African parents and have visited the country several times, and can confirm that the parent comment is exactly correct. SA can come as a shock if you’re not expecting it: even just driving from Cape Town airport to the central city, the view abruptly switches from tin shacks as far as the eye can see, to houses (which in comparison are mansions) surrounded by barbed wire and electric fences. And it’s the same no matter where you travel. And this is in one of the more affluent and safe cities in SA — ‘safe’ as in, you’re not actually risking your life if you walk on the street in one of the more touristy areas. Definitely an amazing country to visit, but the inequality is utterly extreme.
EDIT: Here’s an example of what I mean. [0] is a Google Street View of a bridge near Cape Town International Airport. On the one side: tin shacks. On the other side: a golf course, behind middle-class (I think) housing.
[0] https://www.google.com/maps/@-33.9675053,18.5735234,3a,60y,2...