I actually have a carob tree growing in my front garden, though I have no clue how to extract the carob from thepods!!
Carob is a healthy alternative to chocolate. I found this out about it also..
"Although this product has a slightly different taste than chocolate, it has only one-third the calories (total 1595 calories per pound), is virtually fat-free (chocolate is half fat), is rich in pectin, is nonallergenic, has abundant protein, and has no oxalic acid, which interferes with absorption of calcium. Consequently, carob flour is widely used in health foods for chocolate-like flavoring. A very fine polysaccharide gum--mucilaginous, odorless, tasteless, and colorless--can also be obtained from the pod and is now used in many products. There are also several putative medicinal uses of the plant, and singers formerly chewed the pod husks in the belief that this clears the throat and voice"
I'm not sure if it has caffeine. I should think if it hasn't that it would be perfectly ok for a 2 year old to eat it.