Apple is doing better. My SO has had their iPhone SE for 5 years now and updates keep coming.
[1] https://arstechnica.com/gadgets/2021/03/the-fairphone-2-hits...
I agree, but it's not the hardware which gets outdated, just the software which gets locked away.
I really wish phones had to be bootloader unlocked as legal requirement in EU(even better with hardware/driver reference/blobs/sources) .
Granted, this was just a quick replacement phone when my previous phone just decided randomly to die one day.
At least at the moment it seems that Huawei is an outlier, no such issue with Xiaomi phones.
https://www.pine64.org/pinephone/
https://puri.sm/products/librem-5/
edit: Both PinePhone and Librem 5 also have a replaceable battery and can be repaired to some extent. There are also spare PinePhone mainboards and other spare parts for sale at Pine64 site.
https://pine64.com/product-category/smartphone-spare-parts/?...