I thought the problem with chocolate is theobromine, same effect as you describe, but bitter and comes from cocoa, so less sweet / more expensive chocolate with higher amount of cocoa is actually more dangerous.
But still, as with any poison, the dose is important, this veterinary page says “One ounce of milk chocolate per pound of body weight is a potentially lethal dose in dogs”, so a dog would need to eat 1/16th of its own weight for it to be deadly, even for small dogs that’s more than a whole bar.
I thought the problem with chocolate is theobromine, same effect as you describe, but bitter and comes from cocoa, so less sweet / more expensive chocolate with higher amount of cocoa is actually more dangerous.
But still, as with any poison, the dose is important, this veterinary page says “One ounce of milk chocolate per pound of body weight is a potentially lethal dose in dogs”, so a dog would need to eat 1/16th of its own weight for it to be deadly, even for small dogs that’s more than a whole bar.