The tourists had resumed on a highly vulnerable 126 for eight, having been 61 for seven at one stage on Friday following Roland-Jones' memorable four-wicket burst which accounted for South Africa's top order.
He stayed there long enough for Bavuma to complete his 50 before the top-scorer was last out, caught-behind pushing forward to give Roland-Jones his fifth wicket.
Temba Bavuma's gutsy fifty saw South Africa avoid the follow-on in the third Test against England at The Oval on Saturday. Five years on, however, it was a different story as Amla exited for just six, when he could do nothing other than glove a lifting Roland-Jones ball to wicketkeeper Jonny Bairstow.
James Anderson trapped Du Plessis in front for a single and hung onto a hard-hit return catch from Chris Morris for a couple.
They had to contend with Philander again on Friday morning but he was only able to bowl five overs before once again traipsing up the pavilion steps. It was a huge loss for the Proteas, with the in-form seamer having taken 2-17 in 12 overs on Thursday.
Stokes made 112 and Cook 88 in a competitive first-innings total after England were twice dismissed cheaply in a thumping 340-run second Test defeat at Trent Bridge.
Underfire opening partner Keaton Jennings reached 34 after surviving a dropped catch off Philander on six and an initial lbw decision that was overturned on review after replays showed that Kagiso Rabada's ball had pitched outside leg stump.
He was, however, still nine runs shy of his fifth Test hundred when No 11 Anderson came in.
Stokes eventually holed out off Morkel but the damage was done.