Lets start by getting this out of the way first. While this thread was very much inspired by the thought of Donald Trump winning the presidential elections, it is by no means limited to him personally, but instead seeks to answer the question in a more general manner, seeing as Trump is neither the first nor will he be the last of the popular incompetents who had a real shot at the White House.
The American government is famed for its early adoption of separation of power and inter branch checks and balances, and in accordance the concept is deeply rooted in the American psyche, and the constitution this psyche typically enshrines to the point of scripture. While the system has its loopholes and flaws, which can be handily demonstrated by how the office of president keeps racking up more and more power over the years (not necessarily saying its bad, mind you, just that it shows a limitation on the check's ability to preserve the status quo), the system still poses enough restrictions to actively hamper any attempts at reform, for both better or worse.
Presidents can be impeached, bills that don't enjoy a rare two thirds majority vetoed, the president commands the government while congress controls is purse strings, the supreme court can strike down laws based on its nigh permanent member's fancies, and the states themselves enjoy enough autonomy to have a real shot at wiggling out of the implementation of federal decisions they don't like. In addition, any unpopular president tends to cause the congress' majority to switch over to the other party soon after.
On the other hand, executive orders, while easily flipped by a future president, are no joke in the short term, and the president needs no one's approval before starting ill advised wars (the check for that was made irrelevant once nations stopped officially declaring war, so sending troops is all that matters, assuming the military isn't pushed to mutiny). The simple loss of face of turning his nation, his position, and the institutes he leads into a laughing stock should also not be discounted. And of course, having a president which simply isn't functioning properly as a president in his defined duties can be disastrous in the face of an emergency, should one of those stumble by on his neglected watch.
So with all that in mind, just how much lasting harm could an especially poor president do before he's either shut down entirely or at least has his efforts rendered ineffectual?