There's a lot of territory between "harmless to" and "will kill" a dog. Breeds of dog differ in their sensitivity to various substances (e.g., many white-footed dogs, like Collies, cannot take normal heartworm medication), and chocolate is probably one of these substances.
I generally suggest that people *not* use cocoa-bean mulch because it will draw dogs to their lawn or street-side plantings, there to leave their...ah...personal messages
, perhaps not something the people want. I see that it's time for me to go to the Big Boys and read the labels of their cocoa-based mulches. (I go there maybe once every five or so years for research projects like this.) I'll also ask at my more normally patronized local nursery what they know about the treatments to remove methylxanthines from the cocoa-based mulches.
And, of course, the younger the dog, the more likely he/she is to check things out by mouth: "Hmm. This smells yummy." [Scoops up pieces of mulch while "pet parent" talks to another person.] Later, the young dog exhibits diarrhea and, say, an elevated heart rate and unquenchable thirst (diarrhea is very dehydrating). Owner of dog unable to figure out the cause, things go from there. Dog is sick, probably will not die, but miserable in the meantime, and person has extra cleaning to do....
Better safe than sorry, esp. in cases like this, where other substances are available for mulch.
Sunset Zone 17, USDA Zone 9