I was not successful with the script, it could not remove the protection on my E-Byte board.
Maybe you need two scripts, first this one:
nrf52.dap apreg 1 0x0c 0x00000000
nrf52.dap apreg 1 0x04 0x01
I finally had success with 'nrfjprog -f NRF52 --recover', this cleared the board even with an upgraded ST-Link interface (Segger upgrade). But nrfjprog and the upgraded cable could not program any bootloader. So thank you for this tutorial which made my day happy in the end :-)