Given the a couple of 787's that are most likely "free airframes" with the removal of the PHL-DOH flight, MIA-JHB would be at the edge of the range of a 787-8 with JFK-JHB well beyond the advertised range. CPT would be perhaps 200 miles closer, but doesn't have the connections Johannesburg has. Going to Jo-berg allows potential connections to sub-Saharan Africa via Rwandair, who just happens to be 49% owned by Qatar (plus Kigali's redeveloped airport is 60% owned by Qatar).
I doubt double connections via KGL are a factor in any potential choice between CPT and JNB.