I did the same but with the setwaypoint command.
In the init of the other group leaders:
[this, group this,q1] exec "wpfix.sqs"
q1 = name of your soldier the other group is to follow
Script wpfix.sqs:
_guy = _this select 0
_group = _this select 1
_leader= _this select 2
#loop1
?(!(_leader in (units group player))) : goto "subloop"
goto "next"
#subloop
hint "ping"
?(count units _group == 0) : hint format ["Team %1 is down!", _guy]
?(count units _group == 0) : exit
_leader reveal myguy
_leader = leader _group
[ leader _group] join myguy
#next
[_group,1] setWPPos getpos _leader
~.1
goto "loop1"
Allows you to command 11*12=132 soldiers.
But when your soldier, the other group was following, dies and the group leader of that group joins your group he didn't continue with the last order of his dead predecessor.
He would just say "Where are you?" and stand around stupidly.
Works fine for small groups but you shouldn't expect too much of it.