Stokes spooned a catch to mid-off on 47 and England went from 185-4 to 262-9 at stumps to take little reward from winning the toss and batting first on a good pitch at Newlands.
The collapse followed similar slumps in the first test, when the tourists lost 7-39 in the first innings and 7-64 in the second to lose the series opener by 107 runs.
Ollie Pope resisted to stumps with his 56 not out on his recall after being ill for the first test. Last-man James Anderson was with him on 3 not out. They had clung on at the end of the day to add 28 valuable runs after England was 234-9 when Stuart Broad's stumps were rearranged by a yorker from quick bowler Kagiso Rabada.
South Africa was still happy with its work.
"I think we'll take that and run with it tomorrow," said South Africa pace bowler Dwaine Pretorius.
Stokes, who made a career-best 258 at record pace on his last visit to Newlands four years ago, appeared to have momentarily swung the momentum of the opening day with his six fours and a six in a 58-run stand with Pope.
The thousands of England fans who poured into Newlands for South Africa's marquee New Year test hoped so.
But the star allrounder hit a half-volley straight to Dean Elgar off the bowling of Anrich Nortje, then rested his head against his bat in frustration and walked off.
"Definitely it's a missed opportunity," Pope said. "I'm sure Stokesy will be pretty frustrated as well. He'll be annoyed as anyone."
Stokes wasn't the only one to miss out.
Five of England's top seven batsmen made promising starts in the Cape Town sunshine but didn't follow through: Dom Sibley was out for 34, Joe Denly for 38, captain Joe Root for 35, Stokes for his 47 and Jos Buttler for a quickfire 29 off 27 balls — exciting but not what England needed.
Opener Zak Crawley, rushed into the team as an injury replacement for Rory Burns, was the first man out for 4 and England was often under pressure on the opening day except for periods when Denly and Sibley, and then Stokes and Pope, were together.
England's on-field struggles in South Africa have mirrored its problems off the field. As many as 11 players in the squad were affected by a flu-like illness before and during the first test in Centurion, which the tourists lost in four days. There was no better luck for England in Cape Town when fast bowler Jofra Archer and opening batsman Burns were injured in training ahead of the second test and ruled out of the game.
Burns, England's best batsman in the first test, damaged ligaments in his left ankle playing soccer in a warm-up drill and was out of the rest of the series and heading home for treatment. England has now banned soccer as a warm-up at training sessions.
Crawley, with just one test appearance, was rushed into the team and lasted three overs before edging behind to Vernon Philander.
England's top three — Crawley, Sibley and Denly — came into the match with only 15 test appearances between them.
South Africa's front-line pace pair of Philander and Rabada had two wickets each, as did Pretorius, but newcomer Nortje continued to be the Proteas' breakthrough bowler.
He removed Root via a fierce bouncer that flew off the England skipper's gloves to wicketkeeper Quinton de Kock. The South Africans celebrated with gusto as Root had been dropped by Rassie van der Dussen at first slip earlier in the over. Root walked as the South Africans went up for the appeal.
Nortje also picked up the precious wicket of Stokes.
Pope showed impressive resolve on a day when England was hoping to put its struggles behind it after winning the toss on what looked like a batting-friendly pitch.
He also survived being caught at fine leg off a top edge near the end of the day. Rabada had over-stepped and was called for a no-ball.