I have a hard time imagining a single SCOTUS justice would call this deal Constitutional. The Court's been pretty consistent that the terms for holding federal office are listed in the Constitution and can't be added to without a Constitutional amendment. If Trump is over 35, a natural born citizen who has resided in the US for more than 14 years, not disqualified under the 14th Amendment by Congress, and hasn't already been elected to two terms, he's eligible to be president. No government officials can take that away. Plus, in Brady v US, SCOTUS listed a reliance on "promises that are, by their nature, improper as having no proper relationship to the prosecutor's business" as a reason to invalidate a plea deal. Seems pretty open and shut to me that a political promise falls into category
I guess there's a non frivolous argument that a criminal defendant has near infinite latitude in waiving their rights. But expanding that principle so radically as to allowing this situation would be extremely contrary to both liberal jurisprudence and right-wing hackery* that I don't think Alito, Sotomayor, or anyone in between would find it persuasive. This would probably be an easy 9-0 reversal
*This is not to say that I think the right wing justices would be motivated, in whole or even in part, on hackery here. You'd probably get the same outcome if the roles were reversed and it was a Democrat who received this sort of deal. The Court isn't that right wing. The point is that the majority would reach the same outcome if it acted in good faith or if it picked a conclusion and worked backwards - ie this would be an easy case.