Yeah, do it some more! That's why that ride exists - to put the hurt on the participants. That's how they got so they could do that.
You say your breathing wasn't any harder but your legs were cooked. I'm guessing you still had a lot in the tank, but didn't know it. Go out on this ride again, only next time when they surge, you kick your cadence way up until your breathing is fast and deep - about all you can handle. Judge your cadence by your breathing. Pedal fast enough that your breathing is just under the panting level. 100-105 should do it.
You'll be at lactate threshold, which should be fine because these surges don't last long and as long as you stay at the back you'll be OK. The high cadence will spare your legs. That's the point of it. So you'll be trading oxygen (free and unlimited) for muscle glycogen (limited). You'll also notice that the high cadence will enable you to respond better to natural surges in the line and you'll hold your wheel tighter.
If you come to the front, hold the speed, which will drive you anaerobic almost instantly, then roll off to the left and let the next guy take it. Those little anaerobic intervals will help a lot, too.
You can practice on your own. Get out on the flat, get aero, and bring it up. Experiment with position, breathing, and cadence while watching your speed. You should have 15 minutes of steady state to fool around with various parameters. Find out what combination makes you the fastest and keeps your legs alive. Then once a week you can do 15 minute intervals like that if you can find enough room on the road. Do three intervals with 10 minutes of easy spinning between them.
There's another defensive tactic you can try in the line. Get more aero. You can still hold the hoods, but get your forearms parallel to the ground. Bring your knees in. See if that helps or if it restricts your breathing too much.