Writing Flash Programmer... Fail Unlock Tool Instant

esptool.py itself has --before default_reset and --after hard_reset . But for hard lock, use:

Once you’ve used an unlock tool to recover your device, prevent recurrence: writing flash programmer... fail unlock tool