My iPhone 5 frequently and randomly decides to turn itself off. When it is about to go, it freezes, shows the 'turning off wheel/circle' and then goes black, with the exception of a tiny red dot in the middle. Then after a few seconds it goes completely black. My lock button is also broken so without a charger and a powerpoint, I am unable to revive it!
You're very likely to have a dying battery.
You might be eligible to Apple's iPhone 5 battery replacement program.