1650
It's official: Smartphones will need to have replaceable batteries by 2027
(www.androidauthority.com)
This is a most excellent place for technology news and articles.
Security/OS updates: 4 years on typical android at this point (fair phone claiming 7) 5 on an iPhone.
I did a battery replacement on my iPhone 7 at about the 3 year mark and got another 2 years out of it. Full updates from apple and 100% App Store app compatibility that whole time.
iPhones get OS updates for ~6 years, security patches for longer. In 2021, apple updated a 9 year old phone with a security patch.
Apple is objectively the only way to go if you want a device that you’ll be able to use for >5 years.