I'm guessing the poster is referring to AOSP and custom ROMs. If so, yes, it is entirely possible, but not something I'd expect any normal human being to do.
Not all phones allow custom ROMs and most that do completely void your warranty. Doing it yourself is a complete non-starter for at least 95% of the population.
In practical terms, you can simply not log into a Google account on any Android device, including those made by Google, and Google will get less data about you than Apple does on iOS.
The key difference is user choice. An iOS user has no choice but to send their location data and app usage data to Apple. No such required privacy violations on Android.