Create your group. In the init fields of the units that you want to keep still write
doStop this
Give the group a bunch of move waypoints, a cycle waypoint, and then whatever waypoints you want for after the enemy is detected. Synchro the cycle waypoint with a switch trigger:
Activation field: West (enemy) detected by East (or whatever)
Condition: this or ("alive _x" count units grp1 < 7)
On activation: leader grp1 setBehaviour "aware"; "_x doFollow (leader grp1)" forEach units grp1
Syntax not guaranteed. In the original trigger you'll have to change the 7 to the actual number of group member. Once you've got it working, copy and paste to your heart's content.
You have to change the name of the group in the init field of each group leader after you have copied and pasted, and you'll have to change the group name in the trigger.
Easy peasy lemon squeezy.