Hello,
We understand that your device is rebooting by itself over and over again. This could be due to hardware component on your phone since you've already tried to reset your phone to its factory settings but still experiencing the same. You can try to search online, or check with a local phone store for a battery replacement.
Alternatively, you can visit a service center or you can bring your device to one of the Microsoft authorized service provider (B2X) to have it checked or repaired.
Feel free to post back if you have other queries.