That is why I left the google Pixel for iPhone. I liked my Pixel, but at the time, they only did 3 years of support and security updates, I understand they recently upped it to 4 or 5 years? Sure, my iPhone costs more, but if I use a phone for its total life span (when it stops getting security updates), the iPhone comes out cheaper if you divide the cost of the phone by the number of years it gets supported.
I'm using an iPhone 6S, I changed the battery after around three years. The only issue is it gets pretty hot sometimes, still not sure what it is but it's manageable.