Got it! (Only on paper; still have to actually try it.) I'm too embarrassed
to say how many diagrams I analyzed... In hindsight, if I had just taken your
diagram and tried various ways of making it symmetrical, I would have found
what you intended a lot sooner. If I can successfully figure out how to upload
the diagram, you'll see that it's basically your design for track power (your
second photo), but now symmetrical (as we should expect). The four posts I
labeled A are connected to the A terminal on the transformer, and the two
posts you labeled B should still be fed stall voltage.
The sequence the relays become active is 124 (just as X starts), then 34
(once X has moved a full train length ahead, then 134, then 12, then it
starts over. As Y arrives and stops, relays 1, 2, and 4 are on, and 3 is
off. X and X-behind get A-terminal power, Y gets 0 volts, and Y-behind
gets B voltage (so the Y-train should stop quickly). When only relays
3 and 4 are on, X is at 0 volts (which is fine, since no cars are there now),
X-behind has full power (so the X-train can return without stalling), Y and
Y-behind now have stall voltage. The symmetrical situation holds for the
combinations 134 and 12. This matches what you described, except we don't
have to worry about increased stopping distance.
In the third diagram, I think it will be possible to eliminate one set of
poles. Since 124, 34, 134, and 12 are the only combinations, instead of
testing for 124, we could test for 1-on, 3-off, 4-on. By using both the
NO and NC poles of relay 3, relay 2 can be bypassed altogether. So, it may
be possible to get by with one DPDT relay and three 3PDT relays.
I'm still many days away from having this implemented, but I'll eventually
post a followup once I have something concrete to report.