Microsoft hit update handling for Windows Mobile spot on. A 2014 Windows Phone today[1] is a safer bet if you value security than any Android on the market right now. May not run the apps you want, but it is going to have the latest security updates.
[1]My Lumia 929 currently is running Windows 14393.1593, released August 8th, 2017. I can safely expect to receive the next update on September 12th.