Cooling circuits in a hot loft with dusty air and bugs
Really, the usual way to deal with this is a good air filter and forced air exchange (a fan) as well as components rated to work at an industrial-grade temperature range (that is, typically, up to 85°C). For a battery-based UPS, those temperature ranges might be impossible to achieve. An easy solution would be to run cables from the UPS to your unit, and store the UPS underground.

This only works as long as air outside the enclosure is cooler than the thermal limits of your components. When that breaks down, yes, you'll need some form of heat pump (a fridge/Air Conditioning system, an or a Peltier element). Peltiers that are capable enough of getting 10s of watts out there are ... special, so you almost certainly would go for the usual e.g. server-cooling mechanism of electromechanical (read: like a fridge, compressing/decompressing a coolant cycle) heat pumping to a large cooler.

Sealed enclosures aren't all that easy – not only do you need something to get the heat from inside out, you also get condensation issues that are hard to manage.