Been through JNB quite a few times these past few years.
Don't go through transit immigration - you'll get stuck there in a boring waiting room until the CX check in opens 2 hours before departure. OTOH it'll probably be easier explaining to the immigration officers there that you are connecting to HKG - they dont seem to really care where you are arriving from. Never had to produce an itinerary either - just answer verbally.