Power off randomly after screen lock...
Sounds like a hardware problem to me, like the internal power supply. Fixing would probably require a change of the logic board.

If the device is still under warranty, I would just return it as defective.