Interesting. I'm trying to make a list of possible alternate September 1939s, and I recently contemplated the plausibility of this one. It's unlikely, of course. The National Party and Hertzog, who supported neutrality, had outperformed Smuts' pro-British South African Party in the 1933 election; they formed a coalition as the United Party in 1934. In 1938, the last pre-war election, the United Party lost 25 seats to D. F. Malan's National Party, which formed a government in 1948 and subsequently established apartheid. Malan was opposed to South Africa's involvement in the war. So, slightly different election results in 1938 might make Hertzog's position strong enough that Smuts wouldn't be able to make the government fall in September 1939 in favor of his pro-war one. Malan could do better as well. It's hard to say whether any of those leaders might actually keep South Africa out of the war or side against the UK.
I'm going to venture to guess that von Ribbentrop and the Nazis were oblivious to the fact that a British dominion had a government that might not join in a war, or to anti-British sentiment in South Africa generally. They might have tried harder to cultivate a pro-Nazi movement there, and it might possibly have worked.
Having a situation like South Africa's OTL entry in the war unfold in the UK is not altogether impossible, I'll add. Although Chamberlain seems to have been resolved to honor Britain's treaty obligation to Poland, he demurred while France approached a final decision on their involvement. His government may have fallen as early as 3 September had he not declared war.