I failed to understand the solution :(
+----------------+ +---------------+
| T| | |
+----------------+ +---------------+
O O O O
where 'T' marks a toilet. You build your train from a bunch of those cars, and now it does not matter how you connect them, you'll always have a toilet within a car's range, plus at worst the additional cost of crossing into the next car (since you can't put the toilet between two cars, there's a slight asymmetry).Of course, this is exactly equivalent to just making the cars so that they all have restrooms, but are twice as long...
Regular switching track suffices to switch which end of a train a motor units runs on, and some smaller passenger trains can work fine in "push" instead of "pull" mode.