What I don't understand is how to maintain the red lights flashing whilst the same Nano is doing everything else?
But in fact the Nano is not "doing everything else".
You need to understand for one, that it is executing well over a million steps per second (where a "step" may itself include a number of things as it is clocked at 16 million steps per second). What proper code does not do is to "busy wait" on only one event at a time.
This means that it can sample many things, one after another, and take an action (or not) according to what it finds in each case. That is what the "loop" is for - it is not for going through the sequence that you have described, though that sequence is cyclical.
In fact, your sequence is performed by a switch or "state variable" which determines which step is in progress at any one time. So this actually enumerates your eleven steps - the state variable starts at step zero (the one you missed, waiting for a train) and counts through to eleven as each is completed.
And you have a second state variable which is the flashing step of the lights left or right, alternating. It steps from 0 to 1 and back again. A third switch variable determines whether they are flashing or not.
So your main loop() now begins by looking at the first state variable, let's call it "cross1". If it is zero, it checks to see whether a train is in section. If it is, it sets the variable to 1, if not it does nothing and in either case, it moves immediately on to the next section of the loop().
The loop now looks at the "flashes" state to see whether the lights should be flashing. If not, it moves on to the next section of the loop() but if that determines that they should, it then looks to see if a time has elapsed (by comparing the present millis() to that saved the last time the reds were alternated) to see whether to swap over the reds.
Since all this has taken only a few microseconds, the loop() is free to perform any number of other checks provided that whatever it does, can be completed within a few microseconds.
And then it cycles back to the beginning and at that point, the first step being to check "cross1". If it is now 1, then it sets it to 2, turns on the yellow light and makes a note of the present millis() value. The loop then proceeds through each of the other steps as before.
The next pass through the loop, it finds "cross1" to be 2 so it checks millis() to see if that value is yet 5000 (a "UL" or Unsigned Long figure to match millis() ) more than the value saved back in step 1. If not, as before it passes on to the next step in the loop(). If it has exceeded the five seconds, it sets "cross1" to three and turns off the yellow light.
Can you see the pattern at this point?
Noted further comments as I typed this:
I will go away and inwardly digest what you have said, and decide on the way to approach this.
There is nothing to decide. This is the way to approach it, you just have to learn the paradigm and you can do everything with the (one) Arduino. It will be quite a while doing operations as simple as this, before you run out of program memory or processor capability.