Even granary can be skipped in cities that have no food, and are built for resi grabs.
Or they can be delayed if you have no happy cap early, and already no problems with expansion.
I.e. a double fish city needs a library with 4 happies (so scientists for bulbs, sometimes academy, can be hired).
On deity your adapting skills are tested.
Indeed, a granary can be skipped if you have no happy cap. There is a development challenge thread currently active where I built my first granaries probably around T75 because of happy cap and double food and generally almost didn't whip anything until I connected the happy stuff. It is much better to stagnate on settlers and workers while working 2 cottages until you sort that problem out than to stay on size 2-3 while whipping stuff you can't afford and tanking your research.
About adapting skills being tested on deity, I mean, you are punished more for mistakes but I find it hard to play a good game on lower levels because my deity approach is too conservative. A deity level player should almost never lose a game below deity, but if we do something like GOTM, a greed is important as well. You need to know the barb timings, what can you expect from the AI to research for you, what kind of defense will you face against low level AI and stuff like that.
I am into Realism Invictus atm, to refresh things a bit and I see that the same principles apply although many stuff is different. I can play on Deity very comfortably although the AI is supposed to be better (don't actually notice that). You simply need to calculate what pays of the most from your current position and search for synergies or a leverage. It's all numbers for me, regardless of the game.
This is much faster than my playthrough, I need to learn to split my armies into different groups and attack at several front simultaneously. I usally just have one SoD pushing through.
I'd advise that you initiate with multiple stacks to profit on the element of surprise and then, if the AI is still able to damage you, merge your army back into one or two stacks. This should be very fluent and dependable on your situation. Also, scout the enemy before, count the units, avoid hill cities as much as you can until you need to finish the AI off, and don't over-heal, no need to wait all units to heal. That is a huge mistake. Wounded units can still finish the wounded defenders off. if you have a stack of one movers, bring (much) more siege than shock troops. Don't be afraid that units will die. That is normal. There is a tautology applying to the war: the longer the war, the longer the war. If you give an enemy time to build units, they will build units.
Also, consider building the spy to scout around the enemy land, or have sentry mounted units if you are moving with multiple stacks as you need info to balance the stacks right.