This seems to be not something the stacking feature can address, since stacking is about routing (store them until they can be executed). Even if a route is stacked, it does not necessarily determine which switches are being used and how, especially if there are two or more paths a route can be laid from the given start point to the destination block.
There is also the question when to throw a switch back to normal. If a stacked route is executed, it is no longer present in the stacking table after that - there is no purpose keeping it around. So to throw a switch back (after the train has passed I assume) cannot be tied to the route which presumingly throws that switch to begin with and expect the stacking feature to act upon. [If anything, it could be a route feature or a switch feature, as discussed elsewhere in this forum.]
This would than call for to add some kind of pseudo routes, for the sole purpose to throw a switch back to normal. It would be treated like a route (coordinated etc), but it is not a train would use it, so it would need to be cancelled immediately (automatic, via dispatcher command?)
It depends, of course, if I understand this suggestion correctly. Sometimes I may just not see it clearly, so please my apologies for my ignorance ....