Not so fortunate was Varun Chopra, whose return after seven years at Warwickshire lasted just eight balls before he went lbw to the first delivery of Meschede’s second over. Five balls later, Tom Westley, having whipped the Meschede through midwicket, got a tickle to one going down legside and was caught behind.
Nick Browne had looked comfortable in compiling 22 with three boundaries before getting the faintest of touches to a ball from Meschede that came back at him and Essex were 34 for three and it wasn’t even lunch.
Dan Lawrence weighed anchor and took 23 deliveries to get off the mark before driving Michael Hogan through the covers for four from the penultimate ball before lunch. But his obdurate innings ended on nine and 41 balls when he chased a wide one from Timm van der Gugten to Aneurin Donald at second slip.
The introduction of slow left-armer Owen Morgan did for Ravi Bopara after he can clouted five fours in a 53-ball 25. Bopara could not resist it when Morgan tossed one up, charging down the wicket and looking back in anguish as Mark Wallace whipped off the bails. Essex were 85 for five.
But Bopara’s departure brought together Wheater and ten Doeschate, and they had doubled the score in 21 overs before tea. Wheater had a life on 23 when he cross-batted a long hop from Meschede, only for van der Gugten to misjudge the catch at deep mid-on.
It was to prove costly as a thick edge through gully off Michael Hogan gave Wheater his eighth four and an 83-ball fifty. Ten Doeschate followed after tea when a typically scampered single gave him his fifty off 76 balls, the eighth time in nine Championship innings that he has passed the landmark.
Another single brought up the hundred partnership in 26 overs. But next ball, Wheater cut Morgan to Nick Selman at deep point and showed his mixture of frustration and disgust by swishing his bat.
Foster survived a dropped catch at deep square leg when two, but hastened the celebrations with a six off van der Gugten over cow followed quickly by a lofted four off Meschede over midwicket. He was still there at the close on 33.
Earlier, David Masters and Jamie Porter needed just 15 overs with the new-ball in the morning to wrap up the Glamorgan innings for 286 and claim all three bowling points.
Kiran Carlson and Owen Morgan added just four runs to their eighth-wicket stand before Morgan had his middle stump uprooted by Porter. The pair, who came together at 127 for seven, had put on 133 in 47 overs with Morgan contributing 55 from 148 balls.
Carlson finally went for 119, having moved on his overnight score by 18 in the first hour. The 18-year-old had been calmness itself for five hours 17 minutes, but was tempted by a short one from Masters and ended up swatting the ball above his head to Foster.
Masters had his second wicket of the innings next ball when Hogan chased one outside off-stump to give Chopra a catch at first slip.
Essex took the field without leading wicket-taker Graham Napier, who damaged his calf on the first day after moving his season’s tally in the Championship to 63 with four for 46.
Essex captain Ryan ten Doeschate said: "We’re delighted, though it’s a bit weird winning it on day two because the game’s not won and there’s a lot of work to do. It is a great achievement to achieve what we set out to do at the start of the season.
“The last few days have been like a wave. From the Worcestershire game when the crowd were really excited. The support we get here in Championship cricket is really amazing, not only numbers-wise, but they really appreciate the cricket we play."