The answer to the OP's question is, "sort of", or 'in part".
Matt 5:29-30
In Matt 5:29, 30, Jesus is teaching His followers to remove temptations to limit their sin. [One cannot look at evil things if one cannot see them, etc.] That is, Jesus tells His followers to remove temptations that cannot be resisted to help live the Christian virtuous life.
Israel's Conquest
On the other hand, Israel's conquest of Cainan achieved two goals:
A: Wicked nations were destroyed whose probation had ended. We see this many times in Scripture - see appendix below.
B: God wanted to remove these nations so that they woulkd not entice Israel to worship other gods and be dragged away to their associated evil practices. See Ex 34:15, Deut 4:19, 11:16, 12:30, 13:6, 30:17, etc.
Thus, I agree that removing temptation for Israel worshiping false gods was part of the reason for the Cainanite nations' destruction, but there was more to it. Therefore, using Matt 5:29, 30 is only part of the reason. This is somewhat confirmed by the fact that a few nations such as the Amalekites were destroyed much later because their wickedness was not yet complete (see appendix below).
APPENDIX - End of probation
The Bible repeated tells us that our human lives and their associated probation is limited. Here is a sample:
- Gen 6:3 - So the LORD said, “My Spirit will not contend with man forever, for he is mortal; his days shall be 120 years.” [God decreed that the probation of the antediluvian world would be 120 years.]
- Gen 18, 19 describes God’s final end of probation for Sodom and Gomorrah and their destruction.
- 1 Sam 15 describes the end of probation for the Amalekites, and that king Saul was instructed to destroy them. This was to fulfill the prophecy in Num 24:20, Deut 25:17-19.
- 2 Kings 17:13-23 describes the process of Israel’s decent into complete wickedness to the point that they could not be saved.
- Zeph 2:2 - before the decree takes effect and the day passes like chaff, before the burning anger of the LORD comes upon you, before the Day of the LORD’s anger comes upon you.
- Isa 55:6 - Seek the LORD while He may be found; call on Him while He is near.
- Jer 13:16 (NLT) - Give glory to the LORD your God before it is too late. Acknowledge him before he brings darkness upon you, causing you to stumble and fall on the darkening mountains. For then, when you look for light, you will find only terrible darkness and gloom.
- Jer 36:7 (NLT) - Perhaps even yet they will turn from their evil ways and ask the LORD’s forgiveness before it is too late. For the LORD has threatened them with his terrible anger.”
- Dan 9:24 - Seventy weeks are decreed for your people and your holy city to stop their transgression, to put an end to sin, to make atonement for iniquity, to bring in everlasting righteousness, to seal up vision and prophecy, and to anoint the Most Holy Place. [Compare Matt 21:43 - Therefore I tell you that the kingdom of God will be taken away from you and given to a people who will produce its fruit. AND Matt 23:37, 38 - O Jerusalem, Jerusalem, who kills the prophets and stones those sent to her, how often I have longed to gather your children together, as a hen gathers her chicks under her wings, but you were unwilling! Look, your house is left to you desolate.]
- Heb 9:27 - Just as man is appointed to die once, and after that to face judgment. [All of our probation is limited to our lifetime - when we die our probation is ended.]
In summary, probation is limited and God's asks people to decide. For most of us, probation is limited by the extend our lives. For a few who are still alive to personally see Jesus’ return, our probation ends at the final judgement and the God says (Rev 22:10-12):
Then he told me, “Do not seal up the words of prophecy in this book,
because the time is near. Let the unrighteous continue to be
unrighteous, and the vile continue to be vile; let the righteous
continue to practice righteousness, and the holy continue to be holy.
Behold, I am coming soon, and My reward is with Me, to give to each
one according to what he has done.
Note that the end of probation exists not because God’s mercy is limited, but because sinners come to the point where they finally and completely reject God’s salvation and grace. See Rev 6:15-17.