All the scanning, AI and ML are apparently device-based only unless you dial into the Apple servers which is end-to-end encrypted so Apple don’t see or store stuff. For the ChatGPT integration you decide whether to give it permission. That all said, it’s all based on trust so who the feck knows what might happen.