I suggest a read of "An Historical Analysis of the Word of Wisdom" which was a MA thesis submitted at Brigham Young University in 1972 by Paul Peterson - which is what I read to back up my own knowledge (having been raised as a Mormon for the first 18 years of my life).
A lot of early Mormon history is shrouded in mystery because Joseph Smith was a man who repeatedly told different stories, and Mormon theology generally relies on listening to "revelation", which means obedience to authority figures is supposed to be absolute and unquestioned.
Mr Peterson references a couple schools of thought regarding the initial reasons for coffee being included in the "Word of Wisdom":
Sylvester Graham's Physiological Health Reform Movement - which referred specifically to abstaining from tea and coffee; this movement was popularised in Pennsylvania and appears to have made its way to Ohio at a similar time to the announcement of the Word of Wisdom, albeit the author supposes it was not popularised until after the revelation was announced.
The inclusion of coffee and tea was done as a "dig" to Joseph Smith's principal wife Emma Mack Smith; having remarked at a party her disgust at the men chewing and spitting tobacco throughout the house and causing a mess:
...quite a little party of the brethren and sisters being assembled in the Smith house. Some of the men were excessive chewers of the filthy weed and their disgusting slobbering and spitting caused Mrs smith to make the ironical remark that "it would be a good thing if a revelation could be had declaring the use of tobacco a sin and commanding its suppression." The matter was taken up and joked about, one of the brethren suggested that the revelation should also provide for a total abstinence from tea and coffee drinking intending this as a counter dig at the sisters. Sure enough the subject was afterward taken up in dead earnest and the 'word of wisdom' was the result.
Now, important to note, the Word of Wisdom was not a commandment at this time; that is, it was not mandatory to follow - the modern Word of Wisdom that is mandatory and followed with respect to tea, coffee, alcohol, and tobacco to the letter by practicing Mormons developed in the late 19th Century and early-to-mid 20th Century for a few reasons:
1830s - Many Mormons simply cared that Joseph Smith made the revelation and so took it as God's will.
1840s - Slackening of adherence to the Word of Wisdom, largely due to Brigham Young assuming command of the church; Young, at this time did not adhere to the health policy.
1860s - Re-emphasis of the health policy for "economic reasons", with the Mormon migration to Utah - the desert climate and a desire to be self-sufficient gave reason for a waste-not, want-not policy to be pushed by the Church. In this time, Church leadership emphasised local growing of crops that were mentioned in the Word of Wisdom (eventually vineyard owners were counselled to dig up their wine plants).
1860s-1880s - Gradual emphasis to follow the Word of Wisdom as a commandment, focused at the youth of the Church - Young knew that older Mormons would not be able to curb their addictions, particularly to tobacco and coffee.
1880s-1910s - General emphasis towards commandment, but largely focused on temperance as opposed to strict abstinence. Increase in compliance with the Word of Wisdom due to it being "called of God".
Note: This period saw less emphasis on the Word of Wisdom and more emphasis towards the Polygamy issue and trying to curry favour with the US Government to admit Utah as a state.
1910s-1940s - The leadership of Heber Grant stressed total compliance with respect to alcohol, coffee, tea, and tobacco, to the point where it was now impossible to be a member in good standing while still consuming these products.
Since then, little has been stated publicly by Church leadership, other than to stress that "tea, coffee, and alcohol" are the lone prohobited beverages, it is not a ban on caffeine; although leadership has sometimes counselled that members should avoid habit inducing substances.
In short, tea and coffee of any temperature is banned, caffeinated soft drinks are not banned but not recommended, chocolate/cocoa beverages of any temperature are 100% okay.
TL;DR: It's complicated, but importantly this wasn't heavily pushed as a commandment until the 1880s. From 1880-1910s it wasn't stressed because the Polygamy issue was more important to Church leadership than beverage compliance. Since then, Word of Wisdom compliance has been effectively mandatory.