I am currently planning an industrial-style automated workbench and I need to have some 22mm controls mounted. I want to use a regular metal enclosure. (Specific model here) My entire electrical system mainly runs on 12v or 24v DC. Is this okay to do? Or do I need to buy a proper industrial control box?
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 "blowing" 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 "falling" dirt/dust (which NEMA 3 is rated for.)
Not particularly familiar with "22mm" 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.)
If you don't need a back panel then sure you could use this enclosure. If I were you though I'd spend some time and find a local electrical distributor and see what brand of panels they have. You might be surprised to find a nicer box that's similar in price. Look for brands like Rittal, Hammond, Hoffman, or Ralston. The one you referenced from HD is not really all that cheap.
If this is only being used indoors, NEMA 1 (gasketed) or 12 is all you need.