Back when I was still an Android user, I had a Nexus 4. After a year of use, it also started shutting down at random points if battery was below 20%. Before that I had HTC Desire (the first one), which did the same, at reaching 10% of battery, after about a year of use.