How to avoid reformatting external sd card when "Issue with SD card" pops up again?
fsck works surprisingly well. At least if you have root. Not sure if that's required but I'd guess so.
I have outlined my process in this answer and mostly wrote this question so that future visitors have it easier to find this solution with the phrasing as I used here. The relevant parts again:

Figure out what your filesystem type is.
I did that from the recovery terminal using mount and blkid because then there aren't so many other block devices around (e.g. all the magisk devices). My device was called /dev/block/mmcblk0p1 and of type exfat.
Make sure the partition is not mounted. umount /dev/block/mmcblk0p1 should do the trick. Or boot to the system and since android detects an issue it does not mount it automatically. It looks to me like the available fsck is actually slightly different, at least in my case.
Run the relevant command for your filesystem type. Use tab completion to see your options. My command was fsck.exfat /dev/block/mmcblk0p1. Depending on your fsck you can also provide it with the -y flag to auto-fix everything without asking you every time.