I found that my hypothyroidism caused the sugar/ chocolate/ caffeine Merry-go-round. This is a form of self--medication, as the body's endocrine system organs, pancrease, thyroid and adrenals work together to maintain energy levels. So your question as to why you feel the need to self-medicate with sugar and chocolate is a good one. Unfortunately, if you look at symptoms of hypothyroidism and diabetes, they are very similar and interrelated. I'm finding, it is likely that thyroid and diabetes should be addressed together, as in addition to my own experience, my mother was just diagnosed with severe diabetes, having had no prior indications. Doctors think this could have been triggered by medication or other factor, but if you look up causes of diabetes, the list is endless.
Then you you talk about glycogen storage... Another question.
To troubleshoot this you can:
1. Get your a1c, fasting blood sugar and FULL thyroid panel done. I say full thyroid panel because it is old school dogma to test only TSH as a screening for thyroid disease. Unfortunately, depending on how advanced and the type of thyroid condition, TSH levels may show no abnormalities, since TSH levels only tell you what the pituitary thinks is happening in the body, assuming the pituitary is working correctly. You can get these tests at your annual physical, if you feel comfortable waiting.
2. My experience is that I get on this Merry-go-round when my body has become toxic. Remember I have low thyroid disease, which slows metabolism and all body functions including the liver and kidney functions, so the body become jammed up with extra waste. I cleanse frequently and eat a paleo style / strict gluten free diet to try and make it easier for the body to function properly. This is a more holistic way to help get yourself off the harmful sugar binging. Green, leafy vegetables, and particularly dandelion greens help stabilize blood sugar, due to their high mineral/ nutrient content.
Frankly, for the cravings, I find they indicate a toxic liver, as for me, they go away with liver cleansing. (I've always felt this is related to thyroid disease) Lastly, the issues around thyroid disease and the treatment are thought to cause/ increase risk of diabetes.
Hope that helps.