And certainly you've heard of software bugs. You do not think that a small one like "accidentally" "forgetting" to check that a photo had been synced cannot happen, and an "accidental" scan of ALL photos couldn't possibly happen in any situation no matter what bug/corruption/etc? Surely you'll share with the class where YOU hire infallible programmers.
An accidental strip search is a strip search nonetheless.
Luckily, this can all be solved by NOT writing such code. Ever.
Reference: history of literally every dictatorship includes many "reasonable" expansions of power in the name of security/safety/etc...
The slippery slope from Apple checking image hashes to hourly strip-searches seems rather unlikely, which makes your analogy unhelpful.