What can cause premature flash memory corruption where the Bootloader file is stored on the Boron 404X and how to prevent this?
That can happen on STM32 devices (low power causes RDP bit to change, the Dim D7 issue), but should not occur on nRF52 devices.
Are you able to read out the contents of the boot loader by SWD prior to reprogramming it? What's there, 0xff bytes (erased) or some other contents? And is it the bootloader, soft device, or boot loader address in the UICR bytes that's getting overwritten?
I tried flashing it via the SWD and it appears to have bricked the device completely. The device now blinks red 13 times. Subsequently, tried to flash it via USB and it stops "53% | Switching device to normal mode".