Yes, the mains voltage relay and a couple of wires solution shows how easy it is to make it work, but addresses none of the safety issues.
1: I most definitely do not understand the risks and how to address them. Would you be willing to share some knowledge?
Mains voltage is dangerous. If your product goes wrong, you could quite feasibly kill yourself or somebody else - either through electric shock or a fire. It is likely to go wrong in ways that you did not anticipate.
Your problem is to ensure that there is no failure mode that could connect mains voltages to any of the low voltage components, and that high and low voltages are physically as well as electrically isolated. In practical terms, the only sensible way for a novice to do this safely is to use a commercial component for the mains switching. A mains voltage relay is a good starting point and gives you electrical isolation, but you still have to deal with physical isolation of the circuits to and from the relay. If you use a PCB, you need to ensure that the high and low voltage parts are physically remote and sufficiently insulated from each other and that the high voltage part is fully insulated. If you use discrete wiring you need to ensure that the wiring is properly terminated into sockets and everything is mechanically secured.
While this is all doable, there is a very real danger that a novice tackling this problem will overlook something. By far your safest option would be to use a commercial product for the whole mains voltage part rather than try to design and build your own switch.