Well, first of all, it is Trump being Trump...
Secondly, you have to consider the context and forums where he posts 99% of his hyperbolic rhetoric. This was not said during the debate or in a press conference... It's on a social media platform where the audience is very specifically his base and his most ardent critics which he trolls regularly in case you hadn't noticed... This is Trump trolling his enemies and firing up his base, and that's not likely to change. The undecided moderates you suggest he might dissuade are not on these platforms following Trump, and even if they were, I seriously doubt at this point in time that Trump's personality and subsequent rhetoric is going to be the determining factor that will encourage or dissuade a moderate or independent voter from voting for him.
Is it ill-advised? To somebody like you, of course it is... But, to anyone paying attention to Trump since 2015, Trump is not an establishment politician, nor is he a traditional conservative. He is a populist who leans conservative on most issues. Establishment republicans like McCain, Cheney, Romney, etc., hate Trump and were happy to stab him in the back. Yet, by doing so, these RINOs have done a great disservice to this country by letting their emotions affect their political obligations to the people who have elected them. They are guilty of the very thing that they themselves accuse Trump of doing, with the big difference being that Trump has not acted on his vengeful rhetoric as they have...
As for the accusation itself, I would stop short of calling Cheney's and Romney's acts treasonous. But they are certainly not patriots either...