Woah, I hope nothing got damaged besides that thing. Do you have some more information about what happened exactly ? What kind of load did you have on it and how did you wire it up ? Do you have some photos of how the PCB looks inside after the incident ? It’s always interesting to see some forensics done when yet another one of these things bursts up in flames (which seems pretty common).
Basically that’s why CCC (cheap Chinese crap) with counterfeit components and fake certifications and 110/230V mains voltage don’t go together, regardless of how cheap or convenient these devices are. Where are you from ? The wire colour coding looks European or Australian. If ZWave is an option over Wifi, I have used mains power modules from Fibaro and Qubino and they work really well.
BTW, I see you have both mains voltage and low voltage circuits (ESP or something like this in the background) in the same wall box. Note that in most jurisdictions this is against electrical code and your insurance may not be happy about this when something happens.