Ok, in the meantime I bricked the device (accidentally erasing the flash memory so it did not even show up as a USB device anymore) and so I would like to issue a warning:
WARNING: Playing around with a JTAG/SWD programmer (like the ST-Link) without complete knowledge can break things
I was able to re-install the bootloader, went through the recovery procedure described here and got back to where I started (and learned by the way that there is obviously a difference between “bootloader” and “firmware”).
This whole JTAG/SWD thing is quite fascinating and I hope to get to a point where I can do debugging in the Arduino IDE 2.0…