If I can read your iMessages for pornography I can also read them for going against whatever country you live in. It’s not really hard to understand. Apple’s policy is to comply with whatever local laws and government requests in the country it does business in. This means when the Chinese government requests Apple to scan iPhones for certain information, Apple will comply.
Most people in China uses WeChat. They have implemented OCR in their chat to convert all text in images to text and also image filtering and reporting.
China doesn't need Apple at all.
Also iCloud backup and iCloud Photo Library is available to Apple and thus law enforcement in the US, Europe and China.