Read the bible and don't skip any pages and you will see that the god of the old testament in the most immoral character ever. he punished his children by make them suffer before even teaching them right and wrong then expects them to know right and wrong, kills millions of people and billions of animals with the great flood considering that in a population demographic 25% of the people were children and have done nothing, makes a faithful man almost sacrifices is child, kills again children's in Egypt ( could have killed the pharaoh) and many many other immoral things so please please please read the Bible and don't skip
Perhaps you ought to follow your own instructions and read all the passages that state God as loving, kind, and forgiving as well instead of skipping all those parts to focus on what you perceive as God being evil. That way you will get the whole picture instead of a one sided one in which you have chosen to do.
What you are stating is according to what you think with your limited knowledge. You are now claiming to know the mind of God by claiming all the things that God should have done and shouldn't have done. So you are no elevating yourself above God. God is way more knowledgeable than you or any human. He is all knowing so He knew what was going to happen in the future. He knew what those people who were judged were like and that they were never going to repent. He knew that their children would grow up the same. He knew that their sin would spread like a cancer and affect many and in fact would do more harm than anything you perceive God to have done as wrong. It was proven when God told the Israelites to kill all the Amalekites. But they left some alive including the children. They grew up to sin and come again to attack the Israelites later.
The children were actually saved from a life of sin and being possibly sacrificed by their own people as part of their immoral pagan worship. Any child who wasn't at the age of knowing right from wrong would have been taken into heaven. So in the long run they have eternal life rather than being condemned for their sin if they had grown up to do the same thing. The sins of the parents can rub off into the children and then sin becomes their way of life. God knew this and He actually gave warnings to all before hand and in some cases He gave warnings of 100s of years. So they knew they were defying God and they were given the chance to repent. But they choose to reject God and put themselves above God.
God takes no pleasure in judging and punishing sinners. But it has to be done otherwise there is no use in have right and wrong if there are no consequences for wrong. As humans we do the same when we take action against evil doings such as terrorists. We bomb their women and children as part of that action. We did that in the 2nd world war and nuked millions of children. But all the allied forces seen this as acceptable part of winning a war to stop an evil regime which practiced evil deeds. Yet God who is all knowing and more worthy to judge does the same. But He knows that it is the exact right action as He can see all the consequences that would happen if no action was taken.
God is righteous and all loving. This is seen many times in the bible for which you choose to ignore. But the greatest testimony of God is in Jesus Christ. He is the manifestation of God who came to earth. He is the same God in the flesh for us to see before our eyes. So if you want to know what God was really like then look to Jesus because He is the one we actually seen on earth. He proves that God is loving and sinless because He was loving and sinless. So no matter what you want to twist in those old testament stories into being evil we can see the true nature of God in Jesus.
In Ezekiel 18:23 we read, Have I any pleasure in the death of the wicked, declares the Lord God, and not rather that he should turn from his way and live? (see also Ezek. 33:11).
First, the sins of parents,
just like their successes, have an impact on their children.
Second, if the Canaanite children were allowed to live and remain in the land, they could very well act to avenge their parents when they grew up, or at least to pick up again the practices of their parents.
Third, if one holds that there is an age of accountability for children, and that those younger than that are received into heaven with God at their death, although the means of death were frightful and harsh, the Canaanite childrens experience after death would be better than if theyd continued to live among such a sinful people.
https://www.probe.org/god-and-the-canaanites/