Can I use a regular electric box for a control panel?
Not sure what locale you are in, but in the US, at least, you can pretty well do what you like, enclosure-wise, at 24V or even 48V, at least from a code perspective. i.e. you could use an old gutted PC computer case, it it floated your boat and fit your needs.
From a common sense perspective be sure that your enclosure protects the contents from the environment they are in adequately. i.e. NEMA 4 provides better &quot;blowing&quot; dust protection than NEMA 3, which is often important in many shop controls where the shop process makes dust that gets blown around, rather than just &quot;falling&quot; dirt/dust (which NEMA 3 is rated for.)
Not particularly familiar with &quot;22mm&quot; controls, most industrial controls I'm familiar with are mounted to DIN rail (35mm standard size, 32mm and 15mm smaller sizes, modules come in many widths along the rail.)