This sentence is correct. It is just put in the wrong category in your book. As you say, 遅れる is not a progressive form and doesn’t specify any “middle point.”
You could use the verb in the ている-form.
However, this doesn’t mean you were in the middle of missing the train because missing a train is not a durative action. It means that you would have found yourself in a state that resulted from your missing the train.
I would say the difference is in which stage of the scenario to focus on. The first sentence puts focus on the stage where you are still facing the risk of missing the train, whereas the second is more about the (imaginary) situation after you have already missed the train. What actually happened is the same in both. You nearly missed the train (but didn’t).
In practice, both 乗り遅れるところでした and 乗り遅れているところでした can only describe an event that didn't happen in the end. You don't need context to know it. This is because 遅れる is not something you actively begin to do.
In general, the meaning is determined by what comes before it or, in short, context.
When I got home, my family was just about to have lunch.
When I got home, my family was in the middle of lunch.
I nearly ate it without knowing it was past the expiration date.
If I hadn’t checked the expiration date, I would have eaten it.
The only sure rule seems to be that the second sense of “in the middle of” is, by definition, not possible with non-durative verbs. But not many verbs are purely non-durative. You can always zoom in on a punctual action or change to see duration in it.