South Africa had just three wickets standing at 205 for seven at lunch on the final day, with the Proteas needing a further 287 runs to reach a mammoth victory target of 492 in the 100th Test at The Oval.
A win would put England 2-1 up in this four-match series, with just the fourth Test at Old Trafford starting on Friday to come.
Dean Elgar was 113 not out but all of South Africa's other specialist batsmen had been dismissed.
South Africa resumed on 117 for four, with left-handed opener Elgar (72 not out) and Bavuma (16 not out) having already helped the Proteas recover from 52 for four on Sunday.
Victory was all but beyond South Africa, with no side having made more to win in the fourth innings of a Test than the West Indies' 418 for seven against Australia at St John's in 2003.
Stokes, who'd taken two wickets in two balls on Sunday to dismiss Quinton de Kock and South Africa captain Faf du Plessis after making 112 in England's first innings 353, opened the bowling on Monday.
But it was not long before the gritty Elgar pulled and cut the seam-bowling all-rounder for two fours.
Meanwhile Bavuma, who top-scored with 52 in South Africa's meagre first innings 175, again offered resolute support.
But Roland-Jones, who had followed up his stunning Test debut bowling innings return of five for 57 by dismissing star batsman Hashim Amla cheaply for the second time in the match on Sunday, ended a partnership worth 108 runs after coming on as first change.
Aleem Dar ruled not out but England reviewed the experienced Pakistani umpire's decision.
Replays confirmed the ball had hit pad first and indicated it would have hit middle stump.
Bavuma was out for 32 after a defiant innings of more than two hours.
There was no need for a review next ball as South Africa's 160 for five became 160 for six.
Philander, who'd spent much of this match off the field with a stomach complaint, inexplicably padded up to a Roland- Jones delivery that nipped back and was plumb lbw for a golden duck.
Disclaimer: No Business Standard Journalist was involved in creation of this content
