This is a good summary of how the 25th Amendment would work to remove Trump from office until the inauguration. Two important points: (i) It doesn’t have to be invoked to keep him out, and (ii) Pence would never become President, only acting President.
How would the 25th Amendment be invoked?
Section 4 of the amendment provides for instances when the president can’t or won’t admit that he is incapable of carrying out his duties.
“In these circumstances, the section authorizes the vice president and a majority of the cabinet … to declare the President to be disabled,” wrote Thomas Neale a specialist in American national government for the Congressional Research Service wrote in a report published in 2018.
If Vice President Mike Pence and seven other members of President Trump’s cabinet were to make this declaration, Pence would assume the powers of the presidency after a message to this effect is sent to the President pro tem of the Senate and the Speaker of the House.
What would be the president’s recourse?
President Trump would likely not accept this outcome and could fight to retain his powers by trasmitting a message to the leaders of Congress that no disability actually exists.
The Vice President and the cabinet, however, can contest this by providing a second written declaration contradicting the president.
Under such circumstances Trump would not retake power immediately, according to Brian Kalt, constitutional law professor at Michigan State University said in a tweet Thursday.
“The VP remains as acting president during a four-day waiting period,” he wrote Thursday on Twitter. The question would then be sent to Congress, which would have two days to convene to discuss the matter.
“If Congress decides by a two-thirds vote of both houses that the President is unable to discharge the duties of the office, the Vice President continues as Acting President until the disability is resolved,” Neale wrote. “If the two-thirds margin is not obtained, or if Congress is in session at the time but does not vote on the question within 21 days of receiving the requisite declaration, then the President resumes the powers and duties of the office.”
This 21-day period could give Congress means to keep Vice President Pence in power through Biden’s inauguration, even if there aren’t the votes in Congress to get the two-thirds majority needed to declare Trump indefinitely disabled.
Others with better knowledge of the 25th Amendment than I can chime in on whether this analysis is correct.
Also, since it still depends on the a number of Cabinet heads agreeing — to say nothing of Pence — it’s likely pure fantasy. In any case, it’s something to hope/wish/pray for.