Suppose you always want to be running the latest iOS release, but you want to replace your phone as infrequently as possible. You would "only" have to have purchased 4 iPhones since 2007:
| Model | Launch date | Obsoleted by | Price
|-----------|--------------------|--------------|------
| iPhone | June 29, 2007 | iOS 4 | $399 (*price cut)
| iPhone 4 | June 24, 2010 | iOS 8 | $599
| iPhone 6 | September 19, 2014 | iOS 13 | $649
| iPhone 11 | September 13, 2019 | - | $699
Adjusted for inflation, the total for these phones is $3,287 excluding carrier contracts. Assuming the iPhone 11 will be obsoleted by iOS 27 in September 2026, this costs you about $14.29/mo.
I was a long time Android user - but I realised I was getting through 2 or more phones in the time my wife had one. They'd either become obsolete or just die. I reluctantly bought an iPhone on this basis - it's actually going to work out cheaper if I get 5 or 6 years out of it.
However, I find the iPhone keyboard so bad and the settings concept so muddled that I'm going to return to Android when this experiment is over. Probably not for another 4 years though!
You know you can sell and replace your phone if you don't like it. Recent Pixels have 7 years of support and they don't die. That's what I'd recommend you get instead. You can even trade in your iPhone for up to $700 when you buy a Pixel. You really don't need to force yourself to use a phone you don't like, leave alone for that long.
If we're talking anecdotes, my wife changes her iPhone every 4 years because it gets worse and worse. Daughter does the same. I change my Galaxy every 4 years because it gets worse and worse as well. Not sure how some people can say their <insert beloved brand> holds forever, unless they don't really use it of course. No brand really keeps up with the requirements, unless all you do is make phone calls - which is why my dad still has a Sony Ericsson.