I had this problem too, and am a little concerned I have a defective phone
So I had this issue happen this weekend. My daughter was using the phone when it died. Couldn't get it restarted. (I am unlocked via HTC, stock ROM with bloat removed. Phone is a week old.)
After messing with it using the factory charger/cable and other chargers/cable combinations I got nothing. Light would only intermittently come on for a second or two then go back off.
I charged it over night with the factory charger/cable. Didn't work the next day. Charged it all day and night with my old charger/cable that I know works. Didn't work.
Tried multiple variations of taking out the Battery/Sim/SD card and using the plug-in chargers & CPU USB variations with no success.
Luckily, I had ordered a new spare battery and it came in the mail before I returned the phone. Plugged it and it started up fine.
But my concern is that my phone is not properly charging. I have also had other similar charging/battery life issues that raise concern.
As far as not letting it die, **** happens and phones die, if this is a reoccurring problem, that in my mind is pretty unacceptable. A phone should charge when its plugged in no matter what. I may end up returning it to see If just got a defective phone/battery.