There are many routes that the government has to court order/warrant/subpoena information from tech companies.
The tech companies have just about zero ability to resist.
There should likely be legislation enacted that raises chat logs to the level of psychotherapist-patient privilege.