I'll play devil's advocate for a moment on the instructor in this case, but then point out errors I saw.
First, I'm imagining the other 4 in the class who want to get on with their lives and I'd put a priority on getting them through. I can see saying "hey, today is not your day let's try again next weekend" or something similar.
That's the drag with "public" lessons. I'd much rather teach one or two students at a time, but most students don't want to pay the added money that approach would require. I'll do "makeup" dives for free if a diver struggles and just can't do the exercises correctly.
Second, there's a real judgment call about a student's state of mind. After several failed attempts at a skill, some students really need a "time out" to get their head on straight.
Third, the OP didn't say (or I missed it) that the reg was removed BEFORE the ascent. I got the impression he went for the reg when he started to sink on the surface. I think they did the right thing: This isn't a real out of air emergency, but was rapidly becoming a dangerous situation.
There may be a bit of a watermanship (i.e., swimming) issue here: I've had students who had horrifically bad kick technique. It might not affect them swimming horizontally, but when they have to swim vertically (and especially if combined with being negatively buoyant) they don't stand a chance.
OP: I'm not saying any of the above is true, just playing "counsel for the defense."
OK, so now for where I think the instructor messed up, and in part badly.
1. Training should have been to be neutrally buoyant at the start of the CESA. If the student isn't neutral, the instructor should catch that and indicate they become neutral. (And in real life if I were not neutral when I run out of air, I think I'd go straight to buoyant emergency ascent, i.e., dropping weight on the bottom, standards be damned.)
2. Training should have been not to let so much air out of the BCD that you're negatively buoyant at the surface.
3. Everything about this sounds like the OP was overweighted. By the time you do CESA, the instructor has had an opportunity to do a proper weight check with an empty tank at the end of dive 1.
4. I would NEVER deliberately pull a reg from a student's mouth. I understand why the instructor did it; he was hoping to "rescue" the skill before the student inhaled from an "empty" tank. I'll confess I've had students in the situation of not being able to efficiently orally inflate (often due to cold lips not making a good seal) and start to sink. However, the instructor's move at that point is to safely get the diver to the surface and re-try the skill.
5. CESA can and should have been tried again on dive 4. Between the two dives there should be sufficient time to calm even an agitated diver down and talk them through the skill. You take the whole group of 6 out, do everything but the CESA, then surface and either watch 4 exit the water or have a DM guide them to shore. Then try the CESA again with the folks that had trouble. It doesn't slow down the 4 who did it correctly the first time, and it gives the other two a mental boost for overcoming. I've done something similar with lots of divers. Fewer than 1% of my students required the "hey, today is not your day let's try again next weekend" talk. And those were because of panic to the extent of hyperventilation, not just difficulty and frustration with a skill.