@blatham,
You're right about his motives, but I think it will backfire.
Trump has to go down in flames for it to have any chance of succeeding. If he loses by 10 percentage points or less, and there is less than anticipated GOP voter turnout, many Republicans will blame him (at least in part)
Even if Trump does go down in flames, Cruz is unlikely to be the choice in 2020. He couldn't beat Donald Trump in 2016. He's not widely beloved by the GOP base or he would be the candidate today, and his speech was hardly a clarion call that produced buyer's remorse in those who voted for Trump.
His political career is in trouble. He might be able to get re-elected to the Senate, but that's not good enough to satisfy his naked and excessive ambition.
I don't know that he's a sociopath but so many politicians of both parties are that he might very well be one. Almost to a man or woman, his colleagues in the Senate despise him and that's not because he's anti-establishment.
Having said all of this I don't think anyone is 100% venal (not even Hillary Clinton) and so I think there was an element of principle in his decision. I just don't think it was the main motivator.