It is optional to use iCloud Photos. There's no indication you get arrested if they find something, it isn't reported directly to FBI. Apple will just disable your account, and there is an appeals process to restore it if they made a mistake.
There's more nuance here beyond the clickbait headlines.