I checked the crimps, switched the drivers again, tried M84 (executes without error message but motor still doesnt respond after that) and also updated the firmware. Nothing. Problem still persisted.
Fortunately, I think I have found the problem and seems like it's the G-code which would be logical since the reset always happens at the exact same location in the G-code. And the reason for the "bad" G-code is an .stl file with a bad mesh. Funnily enough, it is one of the most downloaded files on thingiverse: the Benchy. After I fixed the mesh in PrusaSlicer, the Benchy printed just fine. The reason why this also happened in Cura is because I am not sure if Cura fixes the mesh sufficiently.
May it be possible that this is also a firmware problem? Considering how often the Benchy is printed with a faulty mesh and without mesh fixing, most firmwares probably still somehow manage to deal with this.