I don't think I'd feel comfortable muzzling my dog for a group class. That almost seem like asking for trouble, making a dog into a victim by taking their only means of defense away. I'd rather just keep away from the rest of the group, stay at the end of the line, and keep away from any dogs that may trigger him. Sounds like the trainer may be grasping at straws because they can't figure out what the issue is or how to address it.
If he is getting amped up on the way into class I'd arrive early or even go to the facility on a day you don't have class and work on him calmly approaching the building. If he is entering the place excited and disengaged you are going to struggle. If he can stay engaged with you from the car all the way to the building I bet you'd see a change. He can't fixate on other dogs if he is focused on you. I'd also make any yappy or crazy behavior by other dogs a cue to focus on and get a reward from you. During Finn's puppy and manners classes there were plenty of barking dogs. The minute one started going off I'd reward him. After one class he was focusing on me whenever another puppy started barking, never got involved in any of the bark parties that occured. I also rewarded when another dog passed by so rather than watch them he'd focus on me and totally ignore the other dog. Every class we've been to he gets complimented on his focus, but I have put the work into building it and still am. You have to watch him like a hawk and stop any sort of watching or staring at other dogs. Trouble almost always starts when two dog get into a staring contest, or one fixates on another. I almost always miss what my classmates are doing because I am so focused on my dog. It goes both ways so if you check out from him he will do the same.