Perry. An important point you're forgetting is that pharoah multiple times agreed to let the israelites go but god changed his mind for him and hardened his heart. Effectively pharoah was being controlled like a puppet just so god could show off.
The God of the ot is not morally acceptable by any standard that isn't uneducated superstitious bronze age