Thanks for the hints, but D2 is designed to be the flyback diode of the relay that's placed directly behind K5. And RE1 has a built-in diode.
My problem was a different one: K3 was leading its 12V to PIN1, which had no voltage divider, only 1 serial resistor.
I've changed the design a little bit, so that PIN1 has a divider now and Vcc and PIN2 have capacitors to stabilize the voltage here. (PIN2 is the voltage to be measured in my application)
I haven't had any failure anymore since then (using a new board as well)! My fan is working fine, which is not too bad since it's getting hot outside
