RFID chip maybe?
> Hitachi holds the record for the smallest RFID chip, at 0.05 mm × 0.05 mm......These dust-sized chips can store 38-digit numbers using 128-bit Read Only Memory (ROM). A major challenge is the attachment of antennas, thus limiting read range to only millimeters.
Sounds to me like RFID chips can be small enough to not worry about. Even at 1mm^3, you can likely just let it fall out while melting down plastic, and collect it later. Not that I'm advocating for doing so, I think enforcing a visible symbol indicating the contents is a far better idea.