Somewhere in your long-term memory there is a filing cabinet for things you learned in high school. If you flip to the Constitution and government folder, you have something on Federalist #10. At the very least it's one of those things anyone raised in the American educational system has seen before.
The Federalist Papers, a three-man public relations effort intended to sell highly skeptical state legislatures on the newly unveiled Constitution, range from deeply profound to tediously pedantic. The tenth installment, by James Madison, speaks to the dangers of Factions. Factions as he described them would be very familiar to us today, because he was describing political parties and interest groups. While the people who created the Constitution deeply distrusted parties and saw no role for them in the system (scour the Constitution and you'll find not even an oblique reference to them) they of course formed almost immediately upon adoption of the Constitution. They formed because nothing in the system forbade them, because people in a political system naturally ally themselves with the like-minded, and because they performed some useful functions like nominating candidates (eventually).
Madison believed that any faction, or group more interested in advancing its own agenda rather than high-mindedly doing what is best for the country, was a danger to the system. Ultimately – long story short – he reassures the reader that through pluralism (the opportunity for many competing voices to participate at many points in the process) the dangers of factions could be mitigated. He also points out correctly that the system of checks and balances would function as a limit on any one group's ability to control political outcomes. Impeachment, for example, was seen in the early days as an important check on the Executive, and anyone who wrote the Constitution would be shocked to come back to life today and find out how rarely we have actually had to use it.
Since Trump won there has been a lot of debate about whether institutions will save us or, more pertinently, whether our institutions can withstand the test of a true demagogue who hasn't the slightest interest in anything other than rule by fiat. Presented with this scenario, Madison and pals would tell us that Congress was given the divided power to impeach – the House to accuse and the Senate to try – to deal with such a person. In that sense, our system is fully prepared to deal with a Trump and the people who created the Constitution could be credited with remarkable foresight.
The problem, however, in practice is not that the Constitution has no provision for dealing with an autocrat-demagogue president. It does. It has a legislature empowered to remove him. What the Constitution does not have, and its authors did not foresee, is a provision for having a House that would watch a demagogue president, shrug half-heartedly, and say, "Whatever, let's use him for political cover." The problem is not that our system cannot control the president – it is that our system was not designed to handle a Congress that has no interest in trying to control the president. The Constitution's authors assumed, wrongly in the current situation, that members of Congress would not want a power-mad lunatic in the presidency. They assumed that elected officials might care a little bit about the country and any long term damage such an individual could inflict. As full of foresight and clever power-sharing arrangements as it may be, our core legal document offers nothing to protect the country or the system as a whole when the people given the responsibility of protecting it are members of a party so thoroughly rotten to its core that it is willing to abandon any pretense of principle if they see an opportunity to derive some benefit from the elevation of a wannabe dictator into the White House.
We can only guess what they would say in response to our current dilemma were they alive to see it, but it's safe to say that of all the ways in which our system could fail this one would not be high on their list of fears. Time has proven Madison largely correct in his prediction that the evils of self interest and factionalism could be reduced to acceptable levels by the nature of the system. There's no telling how strong the safeguards are, though, and they may not be sufficient to deal with a majority party this craven.