While all this is true, God nevertheless hated Esau from the moment he was conceived. Esau, at birth, had done nothing to merit God's contempt. All of these things came later.
That said, was Jacob more righteous than Esau? He, whose very name means deceiver, proved himself to be a liar and deceiver. He cheated Esau from his birthright and the blessing which rightly belonged to Esau. He deceived his father-in-law. What made him worthy of God's love?
Both were deeply flawed. All the heroes and anti-heroes in the Jewish Bible are deeply, deeply flawed.
I don't know that it is completely random to discern who God loves and who he hates, but God's choices are not at all transparent to us.
When it comes to faith, no one had the faith of Abraham, who would have even sacrificed Isaac that day. Yet is it Israel that God ultimately chose for the name for his people.
It might be that Jacob's flaws were more to God's liking that the blind, unquestioning faith of Abraham. Jacob was passionate, he knew what he wanted, and he would fight even the Angel of God himself to get what he wanted.
God is very passionate himself, angry, jealous, zealously, madly in love with his bride, and maybe in Jacob, he found somebody that he could work with, and that was up for the challenge of relating to God just as God is.
There is nothing passive about God, or Jacob or Esau, for that matter. For each of them, their nature is what it is.
But Jacob had something about him that God admired enough to give his name to his people.
God's choices may be arbitrary, and not at all transparent. They are not about karmic wheels of justice and rewarding the good, and punishing the bad.
But there probably is some kind of intelligence in who he picks for his blessing, and who he leaves in the lurch.