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.
If Philander were to play no further part in the third Test, it would be a huge blow for South Africa as he has been their best bowler by far in the Test series.
Earlier, Bavuma's 52 took the Proteas to 175 all out in reply to England's first innings 353 - a deficit of 178.
The 25-year-old Durham left-hander, England-qualified through his mother and by residence, almost fell cheaply again to another slip catch by Dean Elgar off Vernon Philander only for an edge on six to be dropped on this occasion.
And he once again had to leave the field on Friday after bowling five overs, although he did leave with figures of 2/32 from his 17 overs.
Day 3 action of the third Test match between England and South Africa will be on July 29, 2017 (Saturday).
Dallas Cowboy Lucky Whitehead wanted by Prince William police
However, he failed to appear in court for his July 6 hearing, resulting in the issuing of an arrest warrant for the 25-year old. Whitehead's case is just the latest in a string of non-football related incidents involving Cowboys players.
South Africa resumed on 126 for eight, still 28 runs shy of avoiding the follow-on.
Stokes came within a whisker of producing one of the catches of the year low to his left in the gully, but was just unable to keep hold of a powerful Bavuma edge.
The Middlesex seamer completed a memorable debut five-fer with the wicket of Temba Bavuma, who had notched his eighth Test 50 before being caught behind by Jonny Bairstow.
Westley, a longstanding team-mate of Cook at county side Essex, twice drove Philander for four and cover-drove Morkel for another boundary.