This is the reason I always suggest my relatives buy the latest iPhone SE. It'll be cheaper than a comparable Android device in the long run.
5 years of full updates, not just "important security updates", is a pretty good deal. And you can _still_ sell them for a hundred or so euros after the 5 years.