There are many different ways of doing it. Which of them is best for you depends on many factors, some of which may not be obvious.
Patrice has a solution that works for him. As far as I can tell, he has a truly superb dust collection system in his shop, which suggests that dust is not likely to be as great a problem as in someone else's shop. Using a toolbox, rather than a sealed enclosure, and air filters, is clearly enough for him. Elsewhere, without the excellent extraction system, the less-than-perfect sealing of a toolbox, combined with clogging of the air filters by dust, might not provide adequate protection.
I have a system that works for me. It's fully sealed. I am pretty sure it's adequately cooled for my climate/shop. If I'm wrong, the thermal protection on the drives will reduce the switching frequency and "should" power it down before it dies. If/when that happens, I can have a rethink and do whatever is necessary. I already have the heatsinks from a number of dead 20HP drives and had already considered Stacy's "cut a bit out of the panel and add heatsink" idea. I've kept it as a contingency plan, partly because it didn't seem essential and partly because the heatsinks seemed like prospective quench plates. I'd ruled out a filtered ventilation system on the enclosure, largely through concerns over temperature swings and humidity causing condensation during long periods of non-use, but also because it's just a hobby and I can't be bothered with regular filter maintenance. My setup would not be sufficient for a heavy user in a hot climate.
I know one or two guys who've done the Tupperware box thing. It makes me wince a bit, but seems to work for them. I don't know anything else about their shops, but they are hobbyists, rather than professional knifemakers.
How hard you use the machine does make a big difference to the heat generated in the drive, as does the switching frequency. At full-load (2HP), my Altivar 12 (in the red box) will produce 71 Watts of heat at a switching frequency of 16 kHz, but only 57 Watts at 4 kHz.
I've always tended to use the highest frequency available to minimize the apparent noise. It's a habit now and probably not necessary or even helpful. I don't think the first drives I used, back in the late '80s, would go as fast as 4 kHz, which is the minimum switching frequency for my current drives. The drives I've been using lately will automatically reduce the switching frequency as the internal temperature rises.
Generally, platen grinding uses most power, draws most current and generates most heat in the drive. If you find things are marginal, a low-friction platen material, which reduces the current draw, may sometimes be a better use of limited resources than modifying a drive enclosure.
If you need absolute certainty, there's really no alternative to a NEMA4 drive, but for those of us who are happy enough taking what is available, using and/or modifying it to achieve a desired result and taking the hit if they get it wrong, it's a case of working out which bits of the various systems you've seen are applicable to your particular case.
If you are going the sealed enclosure route, googling "electrical enclosure heat dissipation" will throw up some useful information. The Hoffman one is very good, but I can't get a direct link to it without going through Google.