The level range is too broad. Optional groups could conceivable be bigger because a lot more independent assignments are given, although in reality this doesn't always happen simply because there are less optionals than lower levels. I don't come from an area with mega big programs, something like 40 level 4s would be pretty unusual. It's unusual for more than two coaches to be required for a level. When I was an optional, we pretty consistently had two (although some days three, maybe, if you count a dance instructor) coaches for the program, size might have varied once in awhile, but generally about 20 girls being standard, and breaking into different level works. About a 1:10 ratio although for some time due to a coaching change I was in a group that was higher than that and worked out mostly okay, stressful mainly on the coach's part honestly.
Average team size for compulsories, probably less than 10 here, I mean our "large team" designation is capped at like, 7 or 8 (can't remember which). So most teams have one coach per level/level group. Maybe about a 1:8 ratio. With good planning, you might be able to stretch that a little, though when they're just learning the routines it's pretty much at the upper end. You'd have to plan. With good planning I'm sure you could accomplish a lot but that's difficult. You'd have to be efficient. I have no concept of these kinds of 30-40 L4s setups though.
L2 and 3 are not team levels for the most part here, and class ratios tend to hover around that 1:8 as standard max. But most L3 classes are probably closer to 1:5. Preteam about the same ratio.