For whatever reasons you want to do a turn-around in JNB. Time wise it is more than possible as its an early morning arrival with a midday departure.
However, I am not sure if you could "transit" from the same destination... you might need to enter S.A and then go back through departures. There is plenty of time for that. CX wouldn't be the issue. It would be whether or not S.A. immigration would be ok for it, and whether you would need a visa or not to enter S.A. for your turnaround. I am not sure what passport you hold?