While there will always be upsides and downsides to legislation like this, I can’t help but think people using it to repair their phones with new/used parts with less hassle will be way more common than that scenario.
You can’t always choose the worst case outcome of something and make a decision based on that. Example: cars are allowed on roads, but people can be run over if they are crossing the street! Therefore cars should be outlawed…? Apple will always pray on these fears to get the outcome of what they want, and without sugarcoating it, it all comes down to profits.
There are plenty of smart people who work at Apple who can figure out a way to work around this new law while protecting the privacy and security of its users. Apple likely just prefers the more restrictive way because, again, profits.
Simply letting you know parts have been replaced, OEM or not, is an example. It wouldn’t be a scare-screen saying the parts are not genuine, or features are now restricted, just an automated screen simply stating parts have been replaced. Maybe even a section in Settings that shows the history of replaced parts for peace of mind and reference for the user.