This is the text of the 22nd Amendment:
"No person shall be elected to the office of the President more than twice, and no person who has held the office of President, or acted as President, for more than two years of a term to which some other person was elected President shall be elected to the office of the President more than once."
So it doesn't say a President is limited to serving two terms; it says he's limited in the number of terms he can be elected to. I think it's fairly clear that this would not bar Trump from serving as President again if he legitimately got there in a way other than being elected as President: for example, if he were elected to VP or another position in the line of succession and then, under the existing succession rules, succeeded to the presidency due to the folks ahead of him in line dying, resigning, etc.
So to me, the obvious way for Trump to end up President again is to run as VP (or, I guess, get into the House and become speaker) and have the folks in front of him resign, or die, in his favor. (Or just leave the sitting President in place as a puppet and be the shadow president.) It would be a fairly transparent ploy to end up as President again, but it would be within the existing framework of the Constitution. Any solution where he purports to be elected as President again, though, is blatantly unconstitutional on its face.
It's not that simple. There's also the 12th Amendment interaction. Let's go through this:
1. You're right that the 22nd doesn't prevent a person from serving as president even if term-limited for an election. For instance, if Trump attempts another full coup (e.g. defying Supreme Court orders), and the response is a counter-coup -- or more accurately the military removing a lawless commander -- then Barack Obama could fill the role of interim presidency while a new election is scheduled. This is an exaggerated hypo but it gets across the point and it's a point I think we all agree on.
2. It also doesn't prevent the term-limited president from serving as vice president. So, if say in 2029 the Pub were to win, VP Rubio could resign; Congress ratifies Trump as the new VP, and then President Spineless Q. GenericGOP resigns to make Trump president. All legal. I think, though this gets into the 12th interaction a little bit
3. But can Trump be elected as Vice President? That's where the 12th comes in, right? No personally constitutionally ineligible to the office of the president shall be eligible for Vice-president. What exactly does this mean? What does it mean to be constitutionally ineligible?
Here's how I interpret the last sentence of the 12th (this is in part based on readings about the ratification of the 12th and 22nd): it's an anti-loophole provision. We went from a system where the VP was a candidate for president -- meaning that the system necessarily ensured that the VP had the same requirements as president. When the VP became part of a ticket, that guardrail was removed and so they put in another one. As an anti-loophole provision, it prohibits all backdoor ways of sneaking someone into the office who couldn't otherwise get there.
Obviously the 12th Amendment didn't know about the 22nd. It couldn't even have imagined the 22nd, for a number of reasons (including the lack of direct voter election of the president). It is a constitution we are expounding (see Marbury v Madison), meaning that we should not read provisions to be limited to a specific set of facts and our interpretive lens has to widen at least a little (even for originalists) due to the absurdity of projecting a century into the future. So I'm comfortable with the 12th as an anti-loophole provision and I think it's quite clearly the best reading.
4. But does the 22nd fall within the anti-loophole provision? It would be possible, after all, for a subsequent amendment to create a loophole that supersedes the general anti-loophole rule of the 12th. Let's say an amendment passed that read, "A president who has served two non-consecutive terms may run for office as the Vice-President)." Pretty clearly that would govern and the 12th would be not implicated. So did the 22nd do something like that?
My understanding is that Congress did pay some attention to the awkward fit of the 22nd and the 12th -- but it was generally assumed that they were enacting a ban on being elected to more than two-terms full stop. They were not permitting a workaround of going through the VP office.
The reason for the elected language was Harry S Truman. The amendment was proposed and passed Congress in 1947. As it was originally written, it would have potentially barred Truman from seeking re-election in 1952, and the Dems (nor Truman) would be not on board with that. So they went with the elected language at first, but there were concerns that such language wouldn't be sufficient to protect Truman. Thus, they added the second sentence of section 1 (which is longer than the first sentence) explaining that the amendment simply wouldn't apply to Truman. They did not, however, go back to fix the first sentence -- probably because they didn't want to overturn the apple cart in terms of what had already been agreed.
****
So my analysis is: 12th is anti-loophole provision that doesn't allow the vice-presidential gambit for a third term. The 22nd neither creates a loophole or disclaims the application of the 12th. The VP gambit is unconstitutional.
It does not mean that a Speaker gambit would be unconstitutional.