I agree with Rukbat...
The way that you describe it, it sounds like it sounds like your phone recieved an Android OS update. Over the years I have had several Android phones, and each time the phones have received Android OS updates, it has somewhat resembled a Factory Reset.
As Rukbat started, if you find that all of your personal data was wiped out, then it was Factory Reset, and could have been caused by a hardware issue or a problem app. Most likely it would be a hardware issue.
A few years ago I had a HTC One that had a hardware issue and did cause a couple of Factory Resets before it died on me. Ultimately I shipped it to HTC and got it repaired for free.
12-30-2018 12:12 PM