You could use a ude at the start and the end then do specific calls with another bunch of ude's.
Another way is to use instances.
Or make a sub of every operation.
And you could use a branching structure with program labels. With group output activated that might be the least complicated.
You can do many different things incremental, absolute output, repetitions influence sequencing going 123 then 321 or 123 and 123. Tool changes in the main program or not. Special fixture offset calls or just plain displacements.