There is no "third way". End-to-end encryption means no one other than the sender and the intended receiver(s) can access the decrypted messages; full stop. That includes the social media companies and the government. This obviously also precludes hacks like subverting the client software on either side to report back on the content of the messages (i.e. Apple's implementation)—if the user can't trust their client not to deliberately leak details about the message then they don't have E2EE, since someone else's agent has been placed in the communication path.
I specifically covered that. If anyone other than the original sender (one end of the communication channel) and the intended recipient(s) (the other end of the channel) is granted access to any information about the content of the messages (including not just the full plaintext but also e.g. a digest created by a neural network on behalf of the service provider) then the system does not have the characteristics of end-to-end encryption. You've only encrypted part of the communications channel.
In any case, advocating for mandatory digital spies on end-users' devices is arguably worse than attempting to undermine E2EE.
Please don’t try to come up with solutions. At best they will be hopelessly naive or worst: dystopian nightmare worlds. Giving any credence to the idea that E2E w/ side channels is acceptable should be rejected strongly.
What you are proposing is a pluggable censorship module that can identify any forbidden speech and report back to the authorities. It will take less than 16 months for every regime to co-opt for their own aims. It will indirectly lead to the deaths of thousands of dissidents.