[1] https://www.yoctopuce.com/EN/products/category/usb-electrica...
Having said that, you can always buy "modules" from Siemens, Honeywell, etc. Get your circuits audited by someone with more experience, in particular by an experienced electrical engineer before using it live.
Have multiple levels of fail-safe, fuses, fire retardant casings, what not. Just think of every possible worse-case scenario before you do it.
After all, electricity is no joke and can literally kill you.
MEE hobbyists, disregard.
I won't touch electrical on my house and will happily contract it out to a license+bonded electrician for the exact same reason.
That said really cool project and Kudos for tacking it, just make sure your smoke detector is working :).
Even theoretically, the only way a relay could catch fire if the coil inside overheats or if you pass very high voltages to the coil. But, with a well designed circuit, it should be fine.
I'd say you need to include other safety circuitry, as well as proper PCB design, to make sure it doesn't start a fire.
If you don't know what you're doing, don't rely on random stuff from AliExpress etc to be grid safe, and don't try to make stuff that connects to the grid yourself.
If you do not know what you're doing, for stuff like this I'd go with say Fibaro Z-Wave stuff or similar devices which have built-in power monitors, and can interface with Home Assistant or similar.