How to securely lock 100% a microcontroller like ESP32 or ATtiny85 or any other ATtiny?
There is a constant arms race between manufacturers and interested parties that has been going on for decades. As a result modern uC's are quite hard to extract code from. I don't think decapping is feasible anymore, atleast not with any benchtop equipment. With a lockbit set on a modern uC multimillion operations are required to extract code.
And for most of us, that is never ever something we will go up against. (and &quot;we&quot; will loose every single time. If an interested party is that interested they will find a way.)
If you are concerned I would just get a modern or recently revised uC, set the lock bit and unless you are building state-secret code or code in a multi-billion product it will not get extracted.