Yeast (and other microbial) growth during chocolate production is essential for it's taste and quality, I do not think that is something you would necessarily want to prevent. I think you have to specify your question a bit more to exactly what you are aiming at.
Article The Microbiology of Cocoa Fermentation and its Role in Choco...
Chocolates do have cabohydrate content and thus the yeast like to ferment sugars shall be saccharomyces spp. Sodium bezoate or potassium benzoate may be used as a preservative.
Zygosaccharomyces rouxii and candida sp are the species of yeasts that are usually found from chocolate. Sodium benzoate or potassium benzoate can be used as preservative. The health hazards are not significant with these yeasts.