The destruction of Jericho and all of its citizens (as well as the other cities of Canaan and their citizens), is repeatedly stated to be a judgment from God against them because of their iniquity. See, for a clear example, Deuteronomy 9:4-5. In this passage God says that it is not because Israel is good that Israel is going in to possess the land, but because the inhabitants of the land are very wicked and God is punishing them through Israel. God is also fulfilling His covenant with Abraham, Isaac and Jacob by giving Israel the land promised to them, so God is killing two birds with one stone: punishing the evil and fulfilling His promise to Israel. Earlier in Genesis God told Abraham that He would bring his descendants into the land "when the iniquity of the Amorites was full." (Gen. 15:16) Therefore God waited for the right time to judge the people of Canaan when their sins had ripened for judgment.
It is common in the Bible for God to use one people to punish another people. Israel was punished by God through the Philistines, Assyrians, and most notably the Babylonians and the Romans. In the case of the Canaanites, God was using Israel to punish their sin. However, it's important to note that in every case God uses a sinful people to punish a sinful people: there is no case of good guys versus bad guys, and each time God afterwards punishes the instrument of judgment that He used. The Bible is simply showing one of the ways God works in history with the nations. But whoever God uses, God wants it to be perfectly clear that it is really He who is doing the judging. In Deuteronomy 9:3, He says: "Understand therefore this day, that the LORD your God is He who goes over before you; as a consuming fire He shall destroy them, and He shall bring them down before your face: so shall you drive them out, and destroy them quickly, as the LORD has said unto you."
The question as to whether the Canaanites deserved such a punishment ultimately traces back to our recognition of the seriousness of sin. If we have a low view of sin, almost every punishment will seem extreme and wrong except the most mild. A low view of sin is related to a low view of God. It has been said: "There is no little sin, because there is no little God to sin against." (Thomas Brooks) The smaller God is in your eyes the smaller sin will be in your eyes, and the smaller punishment will need to be in your eyes. But the Bible is a book about big punishment, big sin, and a big God. It is because all sin is against God, and therefore all sin is not little, that such severe punishments fit the crime. There is no other way of explaining the destruction of the Canaanites, or more directly: hell. But these are clearly taught by even Jesus Christ in the Bible, and therefore we must listen and learn and not only base our beliefs upon what at first makes sense to our flawed sensibilities. If it is hard for us to see, it is, again, only because we are not seeing God and sin as they really are.
I would encourage you to spend some time reflecting on Romans chapter 1. Then read on through chapters 2 and 3. It will give you a good understanding of sin and its seriousness. These chapters are devoted to the subject of sin in order to show us our need for Christ and the beauty of salvation by grace!
Blessings to you, J----- and D----!
Sincerely, your friend,