"Critical software update required for your Mac" loop after erasing EFI partition
Why not boot to internet recovery and reinstall the current OS to let the installer write a good system and migrate your existing apps and data back in place.
I would probably get a good backup, since at some point you’ll need to wipe your disk, but the steps above do not intentionally break things or delete data. The worst that will happen is you have your data intact and render the Mac unbootable. Unless there is hardware failure or the filesystem is also damaged, no real risk is added by reinstalling the OS.