Anecdotal evidence, but a chick I know has a HTC from 2 years ago and I have an iPhone 6+.
We both take care of ours but hers is physically busted up. The power button doesn't work and the whole phone is slow as molasses. Mine still works a charm. I see a bit of slowness opening apps, but it only has 1GB of RAM, but everything else runs fine. Still a whole day of battery too.
For me this is one of the main reasons I stick with iOS, because it's one manufacturer and "one" phone. Whilst I LOVE the tech inside the S7 Edge, I don't like the Samsung ecosystem. I find it stupid that there are two browsers, two music players, etc. But that's just me. I want the best with little BS. Like do I use Samsung or Google Pay? Why are there two? Are they compatible, etc. Again, the first nexus I had was a HTC, then it went to another manufacturer, now another. There are too many questions with android.
Apple doesn't come without faults though, they price their phones too expensive/do not have good capacity options. But I adore iMessage, Apple Pay, system wide dictionary, iCloud continuation, etc
I work in IT too, so I'm highly computer literate, so it's not a technology issue.
For me, iOS is just s tighter package. I don't think there is one thing that is killing me that is not on iOS.