Speaking as a South African, that article was very interesting and didn’t seem to misrepresent anything that I’m aware of, but I’m also not especially knowledgeable in these areas. I don’t support this law myself, but as mentioned by the article it’s not as bad as Trump makes out.
However, there is some context which I feel is missing from your post, in particular how it’s a bit strange that Trump even cared to politically attack South Africa.
We’re pretty small fry from an economic output point of view, not nothing, but a pretty small market which although it has great potential, has been somewhat stagnant largely due to incompetence and corruption by our government.
Something that would have however gotten notice in the US is that we formally filed a case in ICC against Israel for human rights violations (for the record, I would not personally speak in support of Israel or Palestine).
Something else that is also likely a factor (and is mentioned in the article) is that Musk was born here. Not mentioned in the article is that he has unequivocally stated he has no love for South Africa. If I recall correctly, his family left the country while he was still in school, where he was bullied.
It would be pretty natural that he has some emotional connection to here and would pay some attention to what’s happening, at the very least to things which would reinforce his existing world view on us.
Another interesting thing that happened in the last couple of years is that Starlink looked into operating here, but decided not to when the government said a precondition was that a significant percentage be black owned (in practice many companies who adhere to this essentially view it as a form of tax where they’re obligated to give a portion of their company away).
Our BBBEE laws which dictate that you can’t do business with the government unless your own company and all your suppliers (and their suppliers, ad infinitum) have enough black ownership is quite contentious (and a form racial of discrimination in my books) has resulted in many international investors simply walking away, Starlink amongst them, and I don’t blame them.
But It’s exactly the kind of thing Musk would no doubt have heard about with Starlink and if I were Musk it would have peeved me quite a bit, possibly enough to point us out to Trump who’s always looking for a punching bag to reinforce his existing world views on injustices.