One of the solutions is to move to a model where all data that companies like google have in their servers is encrypted by a key that only the user has in his device.
The side effects are:
-No server side analysis/logging/sharing/selling to advertisers of the user's data
-All decryption takes place at the client side
-Targeting ads/content becomes impossible
-gag orders are rendered useless to seek user data from service providers
Not only for chat apps and email services, literally all user data on servers should be encrypted with the decryption key only on the user's devices. It should basically be impossible to identify a user based on the data that a service provider has.
The idea is similar to that of ZeroDB, but it extends beyond databases to everything related to a user such as files related to a user.
I started using Protonmail 2 weeks ago and I am quite satisfied (planning to migrate all my communication from Gmail to Protonmail). It does feel slower than Gmail (because of the decryption, but that's not that much of a problem). Also, you have to use their own app, it cannot be connected to a mail client, that's a bit of a downside, but I suppose I will be willing to make that compromise.
The side effects are:
-No server side analysis/logging/sharing/selling to advertisers of the user's data
-All decryption takes place at the client side
-Targeting ads/content becomes impossible
-gag orders are rendered useless to seek user data from service providers
-Privacy