In a three-match series level at 1-1, South Africa have so far managed just one individual fifty -- Erwee's 73 in their innings and 12-run win in the first Test at Lord's.
But in the 35-year-old Elgar they have a batsman who has scored nearly 5,000 runs in 79 Tests, including 13 hundreds, at an average just shy of 40.
That experience was on display as he took advantage of anything short and wide, rather than risk a drive that might have led to an edge to a packed slip cordon, while twice cutting Anderson for four through a vacant point region.
Erwee made 26 during a sound opening stand of 58 with his skipper as the sun started to shine in south London.
But Erwee was undone when paceman Stokes brought him forward with a ball that swung late to find the outside edge. Joe Root, diving forward at first slip, held a fine catch.
Earlier, Marco Jansen took 5-35 in 12.2 overs, his maiden five-wicket haul in Test cricket, as South Africa restricted England to a first-innings lead of 40 runs.
England, resuming on their overnight 154-7, lost their last three wickets in 16 legal balls for the addition of just four runs. They were dismissed for 158 in reply to South Africa's 118.
Fast bowler Kagiso Rabada, who struck twice on Sunday to remove tailenders Ollie Robinson and Jack Leach, took 4-81 in 13 overs.
Jansen had been unlucky to be dropped from the South Africa side that lost the second Test by an innings and 85 runs at Old Trafford.
But at the Oval he has led the way for the Proteas, top-scoring with 30 in their meagre first innings before starring with the ball.
England had been well-placed at 84-2 when Jansen removed star batsman Root for 23, with Ollie Pope's 67 on his Surrey home ground the only fifty of the match so far.
Robinson, whose five-wicket haul played a key role in South Africa's collapse, tamely chipped Sunday's second ball of the day from Rabada to short cover before Leach chopped the paceman onto his stumps.
Jansen ensured England were dismissed in 36.2 overs -- the exact same length as South Africa's first innings -- when he had wicketkeeper Ben Foakes (14) caught in the slips.
This match has effectively been reduced to a three-day game after Thursday's opening day was washed out without a ball bowled before Friday's play was abandoned following the death of Britain's Queen Elizabeth II.