Latest grub bricked my system (grub_is_shim_lock_enabled not found)

Right. I see that there was a “typo” in my previous post.

My ESP (EFI System Partition) is mounted at /boot/efi, thus --efi-directory=/boot/efi.

I am not sure though if that was relevant in this case. I think omitting --no-nvram was what solved the issue. I have no way of verifying this now.