I finally got it working without even switching the physical pins. My config now is as follows:

; Spindle
M453 ; select CNC mode
M950 R1 C"out9+out8" L0:24000 ; create Spindle 1 and map the PWM pin (which is not used) to out9 and the ON/OFF pin to out8 (SSR)
M563 P1 S"Spindle" R1 ; Map Spindle 1 to Tool 1 and call it "Spindle"
T1 ; activate Tool 1
M3 S1 ; Switch spindle on at 1rpm (needed for some reason to activate M3 without S-parameter)
M5 ; switch spindle off

For some reason I have to configure the rpm-range although I do not have PWM-control of the spindle, it is only a ON/OFF switch for now. Then also I had to "trigger" (?) the spindle with an M3 S1 command in the config file and then switch the spindle directly off again with M5. If I do that, the spindle starts up if I send M3 in the console of DWC. If I comment it out in the config file, the spindle does not start when using only M3. The first time I always had to add a rpm range. After that, M3 alone was sufficient. I dont know if that is how it is supposed to be for some reason, but thats how it seems to work for me know.

Let me know if this is not a smart move for any reason. Currently I am happy that it works 😃

Thank you so much @jay_s_uk , it was your comments that pointed me in the right direction!!!