I think I see what you are looking to do.
What we see in real life:
1. Train arrives at terminal station and unloads.
2. Yard engine couples to empty coaches and pulls them out (to maintenance or whatever)
3. Mainline engine backs out (goes to maintenance or whatever)
4. Yard engine pushes empty coaches to await loading.
5. Yard engine decouples and goes to next order.
6. Mainline engine couples to loaded coaches and goes to next order.
Coding the orders:
I need to model this. Got a couple of other things to do first so this might take a week or so before I can get at it.
I think I've already done something similar with coal trains, so it should be doable without adding new parameters.
That is one possibility however to make things easier I would suggest.
1. Train arrives at Terminus with Mainline loco
3. Mainline loco decouples from train.
4. New Mainline Loco arrives and couples up to train.
5. Train loads.
6. Train departs with Relief Mainline Loco leading, Now Mainline Loco.
7. Old Mainline Loco waits on train to clear platform.
8. Old Mainline Loco sets off to siding.
9. Old Mainline Loco waits at siding for the next service to become the next New Mainline Loco.
Hope that makes sense.
The procedure you listed is more freight oriented for dropping off wagons in a siding and a pilot loco taking over to push or pull the wagons to a loading bay.
This would only work if you can have one particular service use the same platform I would think?