(My Pixel 6 is rock solid on that by the way.)
This is the core problem - it is a roll of the dice whether your hardware will work five years from today.
I’m less concerned about the software but that is also a problem.
Meanwhile, my iPhone SE from 2016 still works as advertised.
(My Pixel 6 is rock solid on that by the way.)