Stupid question:
Wouldnʼt it be alright if an open source messenger scans messages locally against a secret word list and only sends it to police if there's a hit, otherwise only send it to the recipient with the usual end-to-end encryption?
The secret word list would need to be curated and digitally signed by several parties, including data security advocates to ensure that it doesn't simply contain the entire dictionary.