I would argue this way:
Genocide is essentially a type of murder. God cannot commit murder because He is Just and Merciful by His very nature. But also, we know that God is the author of all life. So our lives are His; he can choose to end someone's life at any time, without it being murder.
For example, the Virgin Mary was not subject to death from disease or accident or old age, because she was not in fallen state. She died because it was God's will, and her will to follow her Son in death to Heaven. God did not commit murder by deciding that His Son would die for us, nor by deciding that Mary would imitate Christ even in death. It fulfills the purpose of God.
For the guilty, the death penalty is moral as a punishment for grave crimes.
Also, all fallen sinners die, sooner or later, because they are in the fallen state.
So God did not sin by deciding that certain tribes in the Promised Land would be put to death for their sins and for God's purpose.
In Scripture, I notice that, at a certain point in time, God tells the Israelites to pass through the land of one of the tribes (later to be put to death). And He tells them not to stray from their path, not to kill or harm anyone, and to pay for anything they take, such as water. He explains that these tribes have not yet filled up the crimes that will later be the cause of God's judgment to order them put to death by the Israelites.
As for the innocent among those tribes, God has the authority to decide when each person dies, even Jesus and Mary (two most innocent persons).
I should also point out that the Israelites did not in fact kill all member of those tribes. Some converted to Judaism and were spared. Others took roles as servants and were spared.
Roman Catholic theologian