These "bad" anaerobic bacterium are in you, on you, around you, in the soil you step onto, around your plants, on your plants, etc.
If you think that your coffee grinds went (going) through anaerobic composting, empty the buckets and create a pile in the shade, add some more plant material, mix well and let it compost.
But don't throw away the gold!