Continuing testing the layout, I found out that there is a track alignment issue right after switch C4 going into section X5; right here:
There are no problems for engines to go out from sections G4 and G5 onto the main tracks, but going into those through section X5 creates this:
Here's how it looks:
I'll need to think about how to fix this one ...