So recently I’ve been seeing the trend where Android OEMs such as Google, Samsung, etc. have been extending their software release times up to like five, six, and seven years after device release. Clearly, phone hardware has gotten to the point where it can support software for that long, and computers have been in that stage for a very long time. From what I can tell, the only OEM that does this currently might be Fairphone.
Edit: The battery is the thing that goes the fastest so manufacturers could just offer new batteries and that would solve a lot of the problem.
But people are constantly buying millions of both, so makes sense to have small yearly updates and major revisions every few years.
Which is basically how both phones and cars are developed now.