I finally managed to fix my console.
The issue was the PRODINFO partition, which was damaged on the sysnand. I used TegraExplore to copy the PRODINFO from the emummc to the sysnand. After that, the firmware booted normally.
I still get the usual 2123-0011 error, but I added a DNS redirect that points all Nintendo servers to localhost. With that in place, it no longer crashes in Semi-stock or CFW. On the official firmware, it still crashes if I try to go online, but that is fine. I also use a donor prod keys to install a game cert so I can play cards (even if I don't do that much).
I now have a stable sysmmc that I can always clone to emummc. The console is banned and in a strange way. Someone (previous owner of this motherboard which was cheap and I knew it) anonymised the serial number, so it cannot update software through official channels. I have to use Daybreak for updates. But for local gaming works-flawless and I never play online so is perfect.