@gg12 fix your liver, then your gut
it appears you are not storing glycogen well, thus the stressed state, insomnia, intense cravings for carbs - quite similar effects to ketogenic diets/excessive fasting. Caffeine has a half-life of 5-6h, thus coffee before 2pm shouldnt interfere tremendously with sleep onset unless dealing with insufficient metabolic adaption to it (u can think of coffee putting your metabolic engines on 110% overdrive). It certainly will do you harm in the long term especially due to it ramping up FFA, Cortisol and perhaps exacerbating gut issues. Haidut has many posts regarding why prolonged Lipolysis = very bad
Usually one adapts to coffee intake within a week, make sure to always side it with milk (since lactose-intolerant, mayb try gelatin), sugar and a meal (Theanine and B3 can help too). I like Affogatos. Keep somehwat of a steady glucose intake/well balanced meals thereafter. If you still crash by the end of the week try tea and focus on gut & liver health first
Also consider Caffeine and CYP1A2 detox pathway as this, high estrogen and/or taking drugs/supplements that bind to the CYP enzyme (e.g. aspirin, quinolone, or phytonutrients like curcumin or polyphenols) might be another factor of heightened caffeine sensitivity / liver issues