Microcontroller freezes randomly when switching on a relay (snubber inside)

Yeah, I know. Just to clarify, in #23 I show black jumpers as to what is happening in the components (no isolation) ... absolutely not meant to interpret as adding them ... therefore circled in red.

Hmm ... well I guess the H/L jumper could act as a power line isolation point. Oh well, here we go again providing free service to the developers of these modules who neglect providing proper (or any) documentation or schematics.