It's absolutely huge!
Scripts running by triggers have to struggle with Arma's engine scheduler (to make it short).
Yours probably never ends.
If you're sure with your groups (no error hanging the process):
You should change also the waypoint name wpt_red1, wpt_red2?.. for each group.
edit / split into other triggers (activated by each other with a small countdown) and put the code for other 2 or 3 groups.
Start with 3 groups, test, add more, (cry for your playability)