Re: I hate to say it...
With an iPhone you get an official battery replacement. And you get security updates, which aren't really optional.
Also do not confuse the monthly 'security' updates (which would cover the android os issues here), with the driver and firmware issues in this article (likely kernel but below android in any case). Google won't deal with this. The monthly updates do not have this. Samsung only supports low level updates, including new os images, for two years.
You're justifying your upgrade because the battery life is less (it is a different matter if it were dead in three years). What if I still find the reduced life acceptable? What if 5.1G++ is not wortwhile? What if I just want to service the battery and avoid ewaste? the answer remains the same - with an Android, my options are to either trust a random third party buggy os or accept walking around known and public security holes.
I'm a captive in the Android system with a ticking timebomb from the day of purchase, I have to bin my phone or be happy to have banking apps, contactless and what not to be possibly compromised.
Android's have a use-by date, while iphones have a best-before date.