0
There are a few issues with that:
First, getting Trump (and Trumpism, for lack of a better term) out of the GOP isn't the only concern. Nominating at least semi-respectable candidates sends powerful signals to the electorate. Cruz would probably lose, but Trump has the ability to taint the party's brand in an entirely different way.
Second, you say Trump losing would purge the party of this, but that's not a given. Already we see both Trump and his supporters making preemptive excuses for his loss. He'll have no reason to accept blame, and every reason to deflect it and try to retain what influence he can. Literally nothing about my interactions with Trump supporters suggests that they're prepared to reflect and genuflect on an electoral loss, even by a substantial margin.
Third, you've already made an argument going the other way: if Cruz loses, it incentivizes the GOP to nominate someone more moderate next time. A Trump loss doesn't really incentivize the party against doing anything it could have plausibly done anyway. Pretty easy to imagine Cruz using it in four years as another example of the dangers of nominating a RINO, because Trump is one of the few Republicans to who that term actually applies. So not only does nominating Trump stop this from happening, it actually seems likely to reinforce it. Which means with Trump, you might have to nominate someone like Cruz anyway, and now you've potentially thrown away two elections.
And fourth, you can't talk about the dangers of upsetting Trump supporters while disregarding the dangers of upsetting conservatives. And primary results aside, there are still far more conservatives in the party than there are Trump supporters. I don't think this genie slides right back into the bottle.