I want to say I read somewhere that android phones, depending on manufacture, May only receive 1, 2, or 3 major OS updates... i think my s8+ revived its last OS update around 1.5 years after it came out. Around when I purchased the s8+, my wife got an iPhone 8... so right now my s8+ is kind of obsolete while the iPhone is still fully supported. There is an obvious value add to iOS devices, which doesn’t surprise me that it translates to higher resale values.
FWIW, we still use s8+ & iPhone 8 as secondary device for the kids to play with. And I need to add that the iPhone is holding strong while the android has hiccups quite often. Screen won’t turn on, brightness might go wacky, some arrant thing will drain the battery very fast. It has to be restarted maybe once a week, and all that’s on it is stock apps and Pokémon go. So I’d say the iPhone hardware may be more sound as well. My wife used to have an s6 Active and while I can’t recall how long into its life cycle the problems started, but it developed an issue where the screen would go unresponsive and you’d have to restart it 2-3 times to get the screen to come on. Only way you could tell it was on was because of sounds it would make.