Exactly the reason why many modern MCU's have a built-in unique 64-128 bit ID. These IDs can be read during programmming and/or runtime (but cannot be overwritten/erased) giving you total control over your part.