I agree that a compost heap that becomes anaerobic is unsuitable for mixing into soil or spreading near plants. I guess I wouldn't have worried much about using it to top-dress subsoil I was rescuing, but you convinced me not to do that, either.
The anaerobic fermentation products (organic acids and even alcohol and ketones) are very toxic when concentrated, and the bacteria that produce them are wasteful of the organic raw materials.
But I always thought that you could "rescue" a stinky heap by aerating it - turn it, add brushy stuff to hold air channels open and let it dry out.
At worst, I thought you could treat the whole stinky mass as a "green" ingredient and mix it with a lot of browns, hopefully chunky browns that would "fluff up" the mix and let air in.
Once the pile is forced back to the aerobic side of The Force, won't the toxins be digested as food for the beneficial microbes, consumed and de-toxified?
Even in an advanced case, wouldn't diluting them and letting rain leach them out bring the pH back into a range where aerobic microbes can thrive?
I know that "healthy" compost heaps work by one wave of microbes eating the raw materials, and then another wave of microbes consumes the first wave. I've assumed that the same process would eventually digest the toxins and anaerobic microbes.
But I'm willing to learn otherwise.
(I have so few sources of raw ingredients that "giving up on" a pile would never enter my mind. Except for the heap that seems to be 50% weed seeds. )