If the transformer has a fixed cable for the mains, I'd use a junction box of some description, ie T&E cable in - flex out. Almost anything will do as long as there is some sort of cable restraint.
example: https://www.tlc-direct.co.uk/Products/CHOC30A.html
EDIT I assume the plinth is removeable for future access, if not it will need to be maintenance free such as a wago box.
example: https://www.tlc-direct.co.uk/Products/CHOC30A.html
EDIT I assume the plinth is removeable for future access, if not it will need to be maintenance free such as a wago box.