Jeffrey Schultz, global markets senior economist at BNP Paribas South Africa, pointed out that many South African companies earn more from offshore operations – leading to the market's strong gains over the past year.

Yet South Africa's stock market continues to hit record highs, even after the controversial firing of a popular finance minister in March that roiled markets. The country also has benefited from sound monetary policy and the institutional credibility of its central bank, the South African Reserve Bank.

While it was just enough to revive the domestic economy, analysts say subdued long-term growth remains a concern. As political infighting rages between the country's president, Jacob Zuma, and opposition parties, investors are proceeding with caution. Foreign direct investment in South Africa has been net negative over the past three years, given a persistently weak policy and growth environment.

After falling in to a "technical" recession earlier this year, one of Africa's largest economies has managed to crawl its way out, even in the face of a credit downgrade earlier this year. Fresh second-quarter data show the country emerged from its second recession in a decade, mainly due in part to an agriculture sector that rebounded from a prolonged drought in 2015.

Hit by political turmoil and a sovereign downgrade to "junk," South Africa's economy has managed to pull off something few people believed it could: post growth.

Global investors have typically given South Africa a pass over its messy domestic politics, and the current gridlock has not deterred too many. However, the scandal-scarred Zuma — who is reportedly considering stepping down ahead of his 2019 term expiration — is a cause for concern.

Zuma has managed to survive a total of eight no-confidence motions in the country's Parliament since he became president. However, a no-confidence vote last month drew support from dozens of defectors from within Zuma's ANC party, a significant development that analysts say hints at growing factionalism within the ANC.

"Zuma is holding on in order to be able to select his successor, so as to be able to avoid jail for corruption," Jan Dehn, head of research with emerging market investment specialist Ashmore, said in an interview. "To get support in ANC he seeks control of the public finances ... so that he can extend patronage."

Meanwhile, Zuma's policies are less than popular with investors. On Wednesday, Johann Rupert, South Africa's richest man, blasted Zuma's desire for "radical economic transformation"— which he branded as little more than "theft," according to a report from Bloomberg. Fears are growing that Nkosazana Dlamini-Zuma, the president's ex-wife who he's publicly backed as his successor, could prevail in her leadership bid.

"The big risk is that Zuma's chosen successor ... becomes the next leader. This means more kleptocracy, more division, fewer reforms and a path of stagnation," Dehn told CNBC.

Still, Dehn recommends investors buy the country's bonds and currency, which offer the potential for high returns. Growth will not be "hugely dynamic until the political situation becomes clearer but the central bank is highly credible, real yields are high and the currency is cheap," he said.

With inflation on its way down, Jon Harrison, managing director and head of emerging market macro strategy at London-based TS Lombard, agreed. "Political tensions remain a powerful driver of investor sentiment. We are relatively more positive on the local debt markets than on equities."

While Zuma remains in place, analysts noted it's important to monitor how Zuma's policies may undermine South Africa's fiscal position — which may lead to more credit downgrades — and any renewed attempts to undermine monetary policy.

"South Africa has a strong private sector which can overcome political turmoil. Having said that, the potential growth rate is much lower than it could have been with less state [spending] and corruption," Viktor Szabo, senior investment manager with Aberdeen Standard Investments, told CNBC.

"Fiscal policy will be monitored closely; the medium-term budget will be presented on Oct. 25 where the growing fiscal shortfall will have to be addressed. This will either be done through tax hikes or higher budget deficit," Szabo said.