To get a more conclusive root cause determination we'd need a lot more info. But some general comments may help you.
Corrosive environments like coal ash, cement dust, H2S, etc, will eventually take its toll on the generator windings, especially in higher humidity areas. In general, at least based on my experience, random wound (or "mush wound" as called by some) stator windings seem way less tolerant to extreme environments or continuous service than form would stators.
TEWC (Totally Enclosed Water Cooled) generators exist, but are specially designed and I have never seen an air cooled generator successfully field retrofitted before (have seen it tired a couple times, none were successful long term).
Some generator manufacturer's offer filter boxes for air inlets, and some users have fabricated their own in many places I have worked. But the filter design must allow for proper air flow to the generator and has monitoring/protection in the event the filters plug. The most successful systems I've seen use stainless steel mesh filter media with differential pressure monitoring across the filter media.
I have, in some cases, used ducting systems to draw cleaner air from outside the generator space, but these modifications require a duct fan to assure proper air volume available at the generator cooling air inlet. So that fan can become a source of failure. At a couple sites we installed a manually operated louver assembly that could be opened in the event of fan failure, drawback was it pulled "dirty" air into the generator until the fan could be fixed.
So you have a few choices,
Get your generator repaired, if the stator iron was not damaged. If you go this route, than as mentioned by Hoxton above, you need to implement a more aggressive maintenance policy, that would include regular testing and inspection. If your primary contaminant is dust and moisture is not an ongoing issue (like coastal or high humidity environments), then regular cleaning (vacuuming and blowing out with dry compressed air) can be helpful in improving service life.
Find a replacement air cooled generator with form wound coils and a marine grade insulation package, possibly with a factory designed and installed filter box. These are becoming available on the surplus market due to decline in offshore oil and gas industries. Not sure where in the world you are but you may find an available unit of the correct frame size as a surplus new, reconditioned or low hour takeout.
You could try to buy a new replacement unit, but currently, at least in my part of the world lead times are huge right now and costs are very high.
You may also be able to find an available replacement TEWC generator, but even with the same base frame size, the enclosures and housing make them quite a bit larger than air cooled units, and most of these units were designed for marine and offshore applications and require fairly low cooling water temperatures. So going that route may require extensive modifications to your site.
If you stay with an air cooled unit, you may consider a ducting solution, but that requires a pretty careful look at your site and generator space to see if it is a viable solution. I have successfully done duction solutions on several sites over the years, but they do add additional maintenance requirements and possible points of failure.
Hope that helps, MikeL.