In modern relevance, the bit about Joshua teaches us:
1. to obey God, even when we think He's wrong;
2. not to make moral compromises for the sake of expediency;
3. making the analogy of the Holy Land to our souls, we are to root out corruption and sin within ourselves, which we can do --- even if it seems impossible --- with the help of God; and
4. the merely human Jeshua failed to root out the evil, but the divine AND human Jeshua (known in English as Jesus, of course) can, and does, succeed where humans failed.
Killing the ancestors of modern Palestians is extremely harsh, but, in hindsight, their descendants have had a pretty miserable existance, so perhaps God was being just.
That said, His ways are not ours, and, IMHO, we are expressly told NOT to try to finish Joshua's job today in the parable of the weeds.
i agree with everything 100%, save the penultimate point. if it were truly more just for them to die, God would have found another servant to carry out His wishes.