Wifi relay three phase power supply problem

You cannot use a diode when switching a.c!
You need a resistor and capacitor in series - something like this.

(You cannot use any capacitor, it must be “X-rated” for mains use: Papel metalizado X2, 250 Va.c.)