Maybe I am misremembering but I thought I went to 0 EP and before the animation played I switched loadouts so I had more than 0 ep (possibly I opened the inventory and manually equipped an item, though) and then I could keep playing just fine, and I did that a couple times but I also failed to do it several times so I gave up on it as a plan.
When you swap to a loadout that would put your EP at 0 or below while on the Overworld, a warning shows up telling you to swap loadouts . If you then swap loadouts to something with more than 0 EP, that warning disappears.
If swap to a loadout that would put your EP at 0 or below while a menu is open, your Remaining EP will flash and say you have 0 EP. If you try to close the menu at this point, it will show you the warning. If you swap before trying to close the menu, everything will play as normal.
In every use case, the game is designed to make sure you don't accidentally end your run by swapping to the wrong loadout. Of course, there could be a bug, but I haven't heard of any problems with this feature until now. Let me know if you run into something like that again, and you think it's a bug. I'll be sure to fix it!