South Africa won their last tour series in New Zealand, with the last one in 2017. Not sure they have ever lost a test series in New Zealand.
The thing with assessing South Africa's test team is that due to a variety of factors, they really haven't had a full strength first choice test side since World Cup 2015 which means the last time they did was January 2015 against West Indies
I mean sure everyone has injuries and all that but South Africa's issues were not just stray injuries but a variety of other factors, the most important being the AB factor.
In Bangladesh in 2015, they had two rained out test matches which they would have won 2-0 and earned some more points
Against England at home in 2015, they Steyn broke down and whatever you might say about Steyn now, in December 2015, he was definitely the first choice fast bowler and he had never been out of the game for so long at that time. I believe Philander was injured for that series too so they basically had two of their best bowlers out for a home series. Take out Starc and Hazelwood, or Anderson/Broad and then judge their attacks.
Then in 2016, they looked to be finally coming together but AB at first had major injuries that kept him out of the New Zealand and Australia away series and then he finally took a break. The fact that they still won 4 series in that time without AB, Steyn is a testament to how quickly the new guys Rabada, QDK stepped up.
In 2017, the England loss was a major setback but out of 4 test matches, they didn't have their best XI for the first 2. Rabada got banned, and Faf was out for the first. Philander had injuries throughout the series although Morkel stepped up.
Watching the India-South Africa series, one thing is clear though - South Africa might be able to replace Steyn and guys like Rabada, Lungi have stepped up big time while the return of Morkel has helped greatly. But there is no replacement for AB. I know that CW has it's share of contrarians who like to say "AB is not all that" but South Africa is not a great batting side and the absence of AB just makes that batting extremely vulnerable. Take the first 2 tests against India, you take out AB's contribution in both the games and then consider how those matches might have gone.
The fact that they're still number 2 in world cricket and only have one major loss - the England series in the last 2 years speaks volumes of their depth. I don't think any of India, Australia or England would have the same record as South Africa if you take out Kohli, Smith or Root for a year.