I don't really see the problem with this. Scanning happens before the message is encrypted or after the message is decrypted (thus preserving the end-to-end encryption itself from compromise), occurs only on the device itself, and will report back only if known illegal content is detected.
It seems to be the best possible method of implementing such scanning. Shouldn't we be supporting this as a proportionate safety measure?