That’s why you don’t make invincible robots.
You make cheap robots that destroy themselves if anything but a human tries to repair them.
Part of the plot to "Blade Runner" is that the replicants have a life expectancy of 4 years. You really want a level of obsolescence or fragility with these things or else there's no stopping them.