Your point about the division between flat and hierarchical cultures reminds me of what Morris Berman says in Wandering God, in which he calls organized religion a "sacred authority complex." Henotheistic religions seem to have reflected the castes within the early kingdoms, since the myths were brands that codified those social relations (as Yuval Harari says).
But yes, if the two arose together, theism couldn't originally have primed us for oligarchy. Animism turned into the organized religions that concentrated divinity at the top of the Great Chain of Being. We can speculate about how exactly that happened, but it's safer to surmise that once the transition occurred, theism began to condition us to grotesque social inequality, by implicitly glorifying it and by deifying the actual gods, the human kings, emperors, dictators, and plutocrats.