Until we get to a point where it's economically sound to keep hardware more than 4 years, the battery won't be an issue.
I would love to not have to trade in phones, and it would be nice to just fix them. I keep my computers 10 years, generally. Those batteries matter, where applicable.
Personally, if you are going to keep your phone more than 3, then anticipate you'll want to change the battery once in its life. When you do, resale isn't high, and if it goes wrong you're not out much. Then forget about the rest; the software will probably work better than your human habits, etc.
I always keep devices, family members use them afterwards. I haven’t sold a single iOS device. We are talking about iPhones here, so I’ll mention iPhones:
I know that this is a fringe case because frankly (and unfortunately) nobody does this, but so far I haven’t seen any noticeable degradation in battery life as long as I keep the iOS version that comes with the phone.
I’m not a heavy user, so my batteries don’t degrade quickly. I’ve used an iPhone 5s (on iOS 8). It’s still there, but I’m not giving it a shot because I broke its screen. Last I know, battery life is still flawless 8 years after I purchased it. I used a 6s on iOS 9, gave it to a family member, forced into iOS 13 by Apple, so any test is now useless. And now I have this 3.5-year-old iPhone Xʀ on iOS 12. Battery life is perfect. I’ve monitored it throughout its entire lifespan and it is perfect. Just like day 1. It’s at 93% health, so not the best example.
I use an iPhone 6s on iOS 10 with 63% health. Battery life is like-new. Yes, it is far worse than my Xʀ, but it is decently usable as a main phone, just like it was back in 2015 for light to moderate user, 6.5 years later.
By this I mean. I don’t know if I’ll ever actually see a significant degradation solely due to battery health. Maybe that day will come, but especially now that batteries are larger, iPhones are perfectly usable for years if kept on their original iOS version, with the original battery. I don’t know what the limit is. I haven’t found it. I know that a 1400-cycle, 63% health 6s on iOS 10 is perfectly usable. I know that there has been no degradation with my 3.5-year old Xʀ on iOS 12 with 93% health.
I tested a 4-year-old iPhone 8 on iOS 14 and battery life was great. Battery health stood at 83% IIRC. I haven’t tested it on iOS 11, but it matched my 6s, so it was fine.
I tested a 9-year-old iPhone 5c and it still retained great battery life.
The impact of updates is larger, but batteries are really long-lasting in terms of the only important factor (screen-on time) if the device’s iOS version is left untouched. Perhaps I’ll find that limit, perhaps I won’t, but so far, so good.
I mentioned this on a different thread: I tested a nearly 9-year-old, heavily used Bluetooth speaker and battery life remained like-new. No battery care at all, used extremely heavily. No software that receives updates. It just works as if I had just pulled it out of its box.
I’m not really noticing this li-ion degradation in any device, to be honest. They’re pretty long-lasting in my experience.