There are a lot of different possibilities here. Like you I am inclined to see the relative harshness of the Old Testament as part of the unfolding revelation of God’s nature and love to a people who were culturally no different from any other nomadic-warlike tribe until, gradually, God moved them in a better and better direction. From my own experience teaching, it seems impossible to take a student with a lifetime of bad habits and false expectations and instantly turn him into a straight A student. But if he is suddenly making an effort, you might meet him halfway, accepting provisionally his mediocre output and ignoring or even permitting some of his bad habits for the time being, but always with a view towards eventually putting him on the most correct path. This logic seems to be reflected in the Old Testament and especially in the contrast between “the Law” (which included both the moral law and ritual and cultural rules) and the prophetic tradition. On one hand, the Hebrews are supposed to keep the law, on the other hand the prophets challenge them to go beyond the letter of the law to the spirit of the law.
The letter of the law (as Jesus pointed out) permitted divorce, but only because the Hebrews’ “hardhardednes”. But “in the beginning it was not that way.” Passages like this suggest to me that God makes temporary concessions in view of long term goals since most people would be lost if they were expected to become saints overnight. However, the very same logic suggests that things like the slaughter of the Cannanites, man, woman and child, may not have been what God intended. After all, if Moses (the Lawgiver) can permit divorce (it’s in scripture!) while Christ specifically tells us that this was not what God actually wanted, but simply allowed in view of the scenarios that were actually possible in context, than this opens up the possibility that whereever we find God permitting or “commanding” objectively evil actions in the Old Testament, that in fact this was not what God wanted but the best he could get from humans under the circumstances. There are many passages in Scripture that suggest something like this (consider the would-be stoning of the woman caught in adultery, which Christ did not seem to be OK with.).
It might be objected that this would imply there are errors in scripture, but I don’t think so. After all, the innerancy of Scripture does not mean that everything anybody does in scripture is right, but rather that it is all God-breathed, that is, that the content and the structure of scripture is intended by God to teach certain truths. However, we already know that one of those truths is the gradual revelation by God to man (in the person of the cantankerous tribes of Israel) of his real nature, of who he really is.