You know, these encryption authentications work between ICs and not between lenses and motors. Keep the coded IC, change the coil. Things also have different breaking modes, for example a screen might break down due to the glass failure(which cannot be coded) and the repair shop can replace the broken assembly part when keeping the IC that ensures the communication with the mainboard. Too complicated for a street shop? Someone will build a service that does it B2B, shops will ship it ti them, they will ship it back leaving only the installation to the street shop.
Possibilities are endless. Some easier some harder but we are talking about talent that makes all kind of replicas of all kind of devices. With billions of iPhones out there, it's actually very lucrative market to be able to salvage 1000USD device, their margins could be even better than the margins of Apple when they charge 100USD to change the glass of the LCD assembly.
That’s known as private-public key crypto with keys burnt into efuses on-die on the SoC.
You can’t get around that (except for that one dude in Shenzhen who just drills into the SoC and solders wires by hand which happen to hit the right spots). But generally, no regular third party repair shop will find a way around this.