Stimulants — Tea and coffee contain an alkaloid theine, besides volatile oils, tannin, &c. Cocoa contains the milder alkaloid, theobromine. They stimulate the heart and nervous systems; tea and coffee have also a diuretic effect. Formerly they were erroneously thought to lessen tissue waste. These alkaloids, being purins, are open to the general objections named elsewhere. Stimulants do not impart energy or force of any kind, but only call forth reserve strength by exciting the heart, nervous system, &c., to increased activity. This is followed by a depression which is as great, generally greater, than the previous stimulation. Except, perhaps, as an occasional medicine, stimulants, should be avoided. Analysis of cocoa shows a good proportion of proteids and a very large quantity of fat. The claim that it is a valuable and nutritious food would only be true if it could be eaten in such quantities as are other foods (bread, fruits, &c.). Were this attempted, poisoning would result from the large quantity of alkaloid. The food value of half a spoonful or thereabouts of cocoa is insignificant. Certain much advertised cocoa mixtures are ridiculous in their pretentions, unscientific in preparation, and often injurious.
Quoted from this book: The Chemistry of Food and Nutrition, by A. W. Duncan, wrote before 1900!
NIH on caffeine.