All cables that are not in an enclosure need secondary insulation (T&E has an insulation layer and a sheath) -- enclosures can be backboxes, pvc boxes, trunking, conduit, consumer units .........
You should never have any exposed live parts.
and save yourself some work and use a shallow surface box..
As mentioned, stuff like that needs additional protection. the relays and bases you used come like that because they are designed to go into a control panel or similar. maybe a trip to wholesaler and get a large enclosure that needs a tool to remove cover.