umami, pirsch analytics both are open source so you can host yourselves or if you don't want to host you can use their services.If you don't want to break the law than "who" is not an option unless you explicitly take permission from the user. All you can have is anonymized data.
Good. But I fear this will have the opposite effect, with sites adding obfuscated self-hosted APIs (that eventually still pump data back to Google and elsewhere), but now almost impossible for ad-blocking to catch (and definitely not as simple as DNS blocking the whole *.google-analytics.com).
...until someone investigates deep enough and discovers that. Remember that under the GDPR the site has an obligation to tell you who they send the data to and for which purposes. So they would be breaking the law two-fold, hiding the truth and processing your data non-consensually. That would be a death sentence in court, since it proves malicious intent to bypass the law.