Jofra Archer struck twice for England as South Africa looked to build a commanding second-innings lead, taking the wickets of Dean Elgar and Faf du Plessis.