Yes there is an inherent risk of a compost pile spontaneously combusting, I've seen it happen when the heap was not put together correctly.
contrary to what would seem impossible, even a properly wetted heap can catch on fire.
What happens is the core reaches very high temperatures because too much fresh green material was piled without any dry, brown material, this creates the same situation as if you cut a
lawn and bagged the fresh grass clippings and tied off the bag.
The internal temps can reach above 190 degrees in such a situation and at that point there is
enough heat to ignite the dry material surrounding the heating core.
When such a situation occurs, it is very similar to a nuclear reactor melt down, the best way to avoid it is to monitor the core temps and preform a turning if the temps indicates an abnormal heating is occurring.
I once had a heap that was tended by a neighbor while I was away at a conference, he put all the grass clippings in the center and then covered them with the outside of the heap.
He did not add any
water, when he was finished. I returned and checked the temp of my heaps, the one he had made the addition to had a core temp of 210 degrees, I forked the heap open and steam
rose from the near combusting core.
I spread this heap out to avert a serious incident, it took the core a full day to cool so I could rebuild the heap. This heap did produce some of the best, nutrient dense compost when compared with the other four heaps I had going at the time.
Redhawk