I would object on the grounds that such an installation is un-servicable without an access portal.
If such a cover/door permits access....
As for myself. I just install a 4 square, deep, and cover it with a 2-gang ring and flat cover.
IMHO, even such a low-power transformer needs some air space for convection cooling.