No, you couldn't, because parts stolen from, for example, a car, aren't then used to repair a device that is then always connected to the internet - and thus potentially a database of stolen parts. For that matter, cars have had windows coded to a particular vehicle for decades.
It would behove the self-interested 'right to repair' spokesfolk to acknowledge the benefit to the end user of not having their phone stolen, slyly or violently, for parts.
Once they do, we can better move towards a system of whitelisted parts from damaged phones being used for repairs.
The RTR folk should also acknowledge that durability and longevity are just as important factors as repairability. As should the media who give them free press to fill column inches. But hey, they've got tools to sell you.
If they do so, they will be more effective at highlighting where Apple et al actually are profiteering from selling new replacement parts.
The required arithmetic really isn't that tricky.