Managed to figure it out, and in case anyone in the future reads this thread and is stuck at the same place as me, here's what I had to do to loop through all the groups to keep separate trades:
Create a variable (we'll call this variable "Group ID") and use it whenever creating a new buy/sell trade or order. All order-opening related blocks need this Group ID variable. When the conditions for your EA have been met to open a new set of trades, increment this Group ID variable and open the new group with the new Group ID.
Create a second variable (we'll call this "ID checker" variable). The purpose of this variable is to mimic the Group ID variable without interfering or changing the Group ID.
To loop through the various groups you have, use an appropriate block (I used the "For each position") with the group mode set to "All (automated and manually opened)" and connect it to a "Modify variable" block.
In the modify variable block, modify the ID checker variable with the group in the loop.
Connect blocks with actions you wish the EA to perform (trailing stop loss in my case).
Picture below depicts points 3, 4 and 5.
Thanks @jstap for the discussion, talking to someone about this really helps.
0_1648518486642_3c679108-8c04-4c18-a2d9-56d739170bf2-image.png