Wasn’t God being unfair to harden Pharaoh’s heart and then punish him for it?
No. First of all, the text is clear that Pharaoh's hardened his own heart long before it says anything about God hardening it. In other words, God is not doing anything actively or unfairly, but merely letting Pharaoh pursue the course Pharaoh had already committed himself to pursue.
Secondly, in Egyptian theology, a hard heart was a heavy heart. The language could be indicating Pharaoh's guilt, not God's unfairness.
Third, in Egyptian literature, a hard heart was one that was decisive. It's possible that God was letting Pharaoh decide his own course.
Any of these could be true, and possibly more than one, but the one that is definitely wrong is the way most people read it—that God is forcing Pharaoh to do things the king doesn't want to do, and then God blames Pharaoh for what God made him do in the first place and then punishes him for it. That’s the one that’s untrue.