My phone's system keeps breaking and eventually stops booting
I own a Xiaomi Redmi 4X which has a really strange problem. The phone keeps restarting at random over a few hours until it enters on a bootloop, and eventually can't boot to the system anymore (the loop stops, it straight up doesn't boot at this stage and only shows the loading screen)
I've tried everything, from doing a factory reset to unlocking and flashing the stock rom, as well as custom roms that I checked were compatible with my device, but no matter what I do it always ends the same way even if it looks like it got fixed (usually about a week without restarts and after that the phone straight up refuses to boot, with the animation even freezing in some instances)
Doing a clean flash allows me to use the phone again for a few days, but as I said, it eventually breaks again without me doing anything to the system. I know it has to be something happening to the configuration of the device because I can access recovery and fastboot just fine and dirty flashing doesn't mitigate the problem at all, however I have a hunch that it may be a hardware problem, because sometimes the phone restarts itself several times when it reaches 80% charge and has been turned off (sometimes when it is on too, but is somewhat inconsistent). Can anyone help me and give me some direction on what to do?
This device probably reached wear estimation for eMMC flash memory (eMMC wear-out). Backup your data that device will reach end of its life soon.