I designed this:
Choice of round DC connector or panel-mounted XT60, and space for a 8.5x13.5 switch
https://www.aliexpress.com/item/1005001485034492.html
https://www.aliexpress.com/item/1005002588435794.html
https://www.aliexpress.com/item/4001032036059.html
I tape a regulator like this for supplying the ESP from the 24V, enough room to attach it inside with double sided adhesive foam
https://www.aliexpress.com/item/1005005919024149.html
wt32-eth01 case.zip (107.9 KB)