That doesn't help if you're trapped between them. Knowing what path he's going to take before he's even finished coming up the stairs doesn't help me when i'm hiding behind a shelf and can't go anywhere without immediately being seen.
it's just RNG, sometimes the first npc will turn their back before the second npc approaches you, and give you maybe a couple of seconds to get out of their LOS, but usually they don't.
My first question would be, why would you hide in the shelf when you can just pick on of the tables and be safe and sound. The trick when leaving your coat is leaving it directly in front of the stair itself. Most of the time you can just stand right in front of the stair on the second floor and be perfectly safe (you can see the position based on my guide or figure that out by yourselves), other than that, you can use your camera and zoom out as far as you can to see NPC coming your way from the stairs. If you do that, you literally can't be trapped between them, in fact I've never encountered this problem at all.
For the LOS problem, well, in my all equipment run I'm just trying my best to not let them see me directly straight, and with that same reason, the second floor can be safe despite brimming with NPC, as long as they're in the favorable position. But if you really having this problem despite not using any equipment, I think there's some flaws in your strategy, I can't say more without looking at your gameplay though.
But personally, I think the problem is more on the fact that you choose a bad hiding spot instead of getting ruined by RNG. The RNG that I encountered are always at the start of the level not in the middle (I didn't count NPC going up to the second floor as RNG since it just meant more waiting instead of losing).