I wouldn't drive a relay directly from a GPIO pin. If you add a transistor you'll get a lot more drive current and avoid problems like weak latch-up.
If you really want to drive directly, look at solid state relays. I am guessing you won't find many mains contactors with 5 volt coils, let alone 3.3v.
Shellys are cheap, easy to interface and DIN mountable (with 3D printed bracket). I wouldn't take the time to use an arduino or other DIY solution unless I really wanted some custom code to do something special.