The Gemara asks this very same question (Megillah 31b):
Abraham said before the Holy One, Blessed be He: Master of the Universe, perhaps, Heaven forbid, the Jewish people will sin before You, and You will do to them as You did to the generation of the Flood and as You did to the generation of the Dispersion, i.e., You will completely destroy them?
We know Hashem can influence man to sin. Omnipotence.
The question is: Would He?
There are different approaches to what happened with Par'oh.
The Rambam says that yes, Hashem will take away the possibility of teshuvah. This is a potential punishment for sin, if the sin is egregious enough. So, what happened to Par'oh could happen to others. Hilkhos Teshuvah ...