Buy unlocked and you don't have to worry about bloatware, what does come installed can mostly be deleted if not deactivated. As far as updates go pixel is the best route for timely updates, unlocked phones also get more timely updates because they don't have to go through the the carrier update.
Also with Android "O" it is looking like the core system and manufacturer system will have 2 separate partitions. Google can push a core update for security patches to all Android phones and then the manufacturer takes care of the rest.
As far as privacy all phones are susceptible, just by simply being connected to the internet with out a VPN. If you are speaking about iMessage encryption then you can just download an encrypted messaging app. If you have a Google email, Facebook, Instagram, or anything social media related then everyone already has access to you data. You can opt out of all the things that Google collects data for as well.