Dirt cheap Android phones ravage power and have no optimisation, can never be updated in most cases, and have terrible performance for anything besides making phone calls. I'd sooner buy a flip phone than a cheap or even midrange Android again.
I'm in that vast median range you compeletely glossed over. I'm a moderate user who uses a range of apps, makes moderate use of the camera, needs a bit of AV functionality, and holds onto a good phone for a couple of years. The iPhone is the absolute best option for my needs. The SoC's in iPhones remain relevant for longer, I get iOS updates until I upgrade my phone, and the cameras are always quality and suit my needs over that two-year period. Everything is simple, aesthetically pleasing, and when my phone is on standby (70% of my day) the iPhone positively sips power versus the Moto G I had with equivalent settings.
There is a vast difference between low/midrange Android phones and the high-end Android devices. Given that most of the customisation and "power user" functions of Android are lost on me, as a moderate user and mobile non-enthusiast, why wouldn't I choose an iPhone?
My backup $150 Redmi 3pro with 4100 mAh would say otherwise.
And stop using "similar settings" while comparing Android and iOS, they manage apps differently. Android does true multitasking while iOS does not. If you want to compare, try an app, such as CM speed booster (free, non root), to force unused Android apps to hibernate like on iOS.
I admit that I "glossed over" a lot of criteria, coz my comment just focuses on "basic executions". May you spare $150 and try that Redmi, you would see that it's not that far of the much more expensive iPhone 7.