I have tried letting the printer idle for many hours and checking the serial connection debug logs for any errors or disconnects. So far it appears the issue does not happen when the machine is idle. So it might very well be EM interference from the steppers or a poorly shielded cable.
I didn't really want to burden you all with the details, seeing as it would take a lot of explaining before you could properly help me debug this thing. And also because I suspect it has to be really frustrating to troubleshoot something by remotely instructing a newbie. But you're right, you can't really give me advice without knowing the specifics so I'll give it a shot.
Let's start with the PSU. On the AC side we have: a yellow ground wire, a black wire labeled N and a red wire labeled L. These all go straight to the 220V mains and the red wire has the main power switch on it.
Now for the DC side. There is one V+/GND pair going into the main board and one pair going into a small MOSFET board. This MOSFET is used to control the bed heater, which is by far the biggest power consumer. It's something along the lines of 200W for the bed heater and 50W for everything else. The bed heater runs on 12VDC. It is PWM-controlled and uses the big-bang approach, meaning it alternates between fully on and fully off to maintain the desired temperature. But I should stress that I am experiencing this issue even when I'm not using the bed heater so I highly doubt this has anything to do with it.
Exiting this MOSFET board we have a black wire going to the bed, which leads me to conclude that the bed is PWM-controlled on the GND side. So presumably to turn off the bed heater it eliminates the voltage differential by raising the GND side to 12V, rather than lowering the positive side to GND. This would also explain why the third positive wire from the PSU goes straight to the bed heater.

Now for the main board itself. The V+/GND wires from the PSU go into the screw terminal on the left side of the board.

What's the red arrow you might ask? Well, one time after stopping mid-print I noticed this particular LED on the board was flashing rapidly. I have never seen this LED turn on before and I have no idea what it signals.
This video shows it happening.
Unfortunately I have not been able to find a circuit diagram for this board. The closest thing I have been able to find was a diagram for an earlier version of this board. The layout has changed a little but it might still provide relevant insights so I'll include it here. The two attached PDF's show the
wiring diagram and the
schematics for this earlier version of the board.
I know that somewhere on this board there is some circuitry to convert the 12V to 5V. There was actually a problem with this because the manufacturer used a capacitor with insufficient capacitance, which resulted in an unstable 5V output. This was clearly visible because the voltage instability resulted in significant fluctuations in the temperature sensor readings which could be seen on the temperature graphs. After replacing the capacitor my sensor readings have been very stable to this day.
Lastly I do not believe that this problem is caused by some form of overheating. It doesn't seem to behave that way. Sometimes it will crash within 1 hour of starting a print, then when I restart the print immediately (without giving it time to cool down) it will run fine for 10+ hours. It would also be strange that it printed fine for hundreds of hours during summer, when it was 32C inside, but now in winter with 20C room temperature it starts acting up. I can't exclude overheating completely but nothing I have seen points in that direction.
Thank you all for your insights!