Similar question to how God could have hardened Pharaoh’s heart? He couldn’t repent and relent? He lost his free will?
There is cause why God used that particular Pharaoh to witness to Moses, Aaron and the children of Israel. And even to us today.
Just as Esau and Jacob earned the roles they played. There is no cause or reason to think either that Pharaoh or Esau have been condemned to hell. That decision is made between each and the Creator.. As it is Written, while in the tomb Christ witnessed to all those back to Noah’s time, before salvation was offered to those living in flesh vessels. There is no record of how many overcame. But we do know Abraham did as he is described as such.