I just posted this last nigh tin another thread - an explanation of reverse loop operation. Of course this “worded” as it applies to DC, and DCC allows you to change the polarity under the train. But this might help in some way.
When I was young in this hobby, every 16 year old modeler I knew understood how this worked…
So think of a single track mainline connected by two loops. Your primary reversing switch for the main line should reflect your direction of travel. Then each loop needs its own separate direction switch connected to the throttle “before” the mainline direction switch.
The loops should be marked to match the loop polarity with the position of the turnout entering the loop. In other words let’s call going clockwise around the loop “West” and counter clockwise “East”.
So then you set the turnout to enter clockwise into the loop, and set the loop reverse switch to “West”. The polarity is now correct for the West bound train to enter the loop in the clockwise direction.
Once the train is completely inside the loop, you switch the turnout to let the train re-enter the mainline. And you reverse the mainline direction switch to East - because that is the direction the train will now be traveling.
The train then exits the loop and continues to travel now going East on the mainline.
So more effectively described, the loops are a place to “hold” the train (even if it is moving) while you reverse the direction of the mainline.
For this reason, any scheme to automate this process is full of problems.
One other way to approach this is to wire the loop so it’s polarity is the same as the mainline using a relay or contacts on the switch machine. Using this method the loop will always be the same polarity as the mainline based on the turnout position.
The loop is still isolated, and its polarity changes when you throw the turnout.
So you drive the train into the loop. You cannot change the turnout with the train running, it will stop and go in reverse. But, if you stop the train, reverse the mainline polarity, throw the turnout, you can now restart the train and proceed out of the loop.
Advantage? you don’t have to make sure the loop is preset correctly. Disadvantage? you have to start and stop the train.
In both cases you are reversing the mainline, not really the loop.
You can use this method with a dead end Wye as well, West bound train drives into dead end leg, turnouts switched to exit via leg opposite the one entered from, train moves in reverse now but still West bound out of other leg. Train stops, turnouts set to the direction the train came from. Mainline direction changed - train proceeds forward and has been turned around and mainline direction switch now reflects “East” bound travel.
Sheldon