Watch out for the 5x, I've seen 3 in addition to mine die the same way. They start rebooting randomly then boot loop. It's an acknowledged problem with the chipset. You can sort of fix it if you are able to load an alternative kernel [0] on it that disabled the big cores and that bought me another few months before it totally died. If you're willing to risk it you can get a higher RAM version of the motherboard on aliexpress where they may have used better solder.
[0] https://www.xda-developers.com/nexus-5x-bootloop-fix-boot-ph...