I assure you South Africa is third world by any measure. The GDP of SA (a large country with tons of resources and a population of 60m) is roughly on par with that of the Toronto metro area (population 7m) or the Phoenix metro (population 5m). It's middle income... and it probably will ~always be.
None of this really matters though - what Musk has done in the US (like it - or him - or not) was only possible in the US.
About your example of living in San Jose, California, USA vs Mexico City: Where would you prefer to live? Where do you think the schools, hospitals, economy, and social safety net (retirement, etc) is better? Sure, the houses may look similar, but San Jose is objectively rich by global standards and Mexico City is middle income.
The term “third world” is a good and very descriptive one.
Just look at Musk and his startups - I bet he's very glad to have that 200 billionth dollar, because now he can have the space program he always wanted. This wouldn't have been possible in the third-world country where he grew up.