Obviously the American founders wanted to prevent another oppressive royalty they were already suffering under, but why/how were they so afraid of a popular figure coming into power?
The Constitutional Convention of 1787 can be understood primarily as an elite backlash against the populist state governments. As James Madison wrote, dissatisfaction with the state governments "contributed more to that uneasiness which produced the Convention, and prepared the public mind for a general reform" than even "the inadequacy of the Confederation."
Because the elites who attended the Constitutional Convention were alarmed by what they saw in state politics, they became convinced of the need for a stronger executive who could act as a counterweight to the populist state legislatures. When the Framers talked about demagogues, they pictured a man like Patrick Henry, who could sway the legislature to his position.
What bothered the Framers so much about the states? There's an economic answer and a social one.
Economic concerns
In Federalist 10, Madison wrote of the "improper or wicked project[s]" he saw occurring at the state level: "a rage for paper money, for an abolition of debts, for an equal division of property."
Paper money was a concern because it provided the temptation for a state, or for its indebted voters, to inflate its way out of debt. Rhode Island took this the furthest by printing large amounts of paper money (which everyone viewed as worthless) and making it a criminal offense for businesses to refuse payment with this money.
Another populist position was the cancellation of debts owed to British creditors. When a state like Virginia confiscated British-held debts (in violation of the Treaty of Paris), many common people celebrated, but the political elites who managed the Confederation's affairs thought it was stupid and short-sighted. Stiffing our creditors made it difficult to obtain new loans from France and the Netherlands, and the British themselves retaliated by keeping troops in the Northwest Territories.
Of course, there's a school of historians who say the Framers were basically conservative rich guys who were unhappy that populist state policies were cutting into their slice of the economic pie. There's probably some truth in all of the above.
Social concerns
When British government officials were cast out in 1776, there was a power vacuum in state politics. According to historian Gordon Wood, “the most pronounced social effect of the Revolution was ... the sudden appearance of new men everywhere in politics and business.” “The Revolution seemed to be … enabling socially insignificant men … to gain positions of dominance without passing through the social ranks," in short, "allowing upstarts” into politics.
Complaints about the state governments were, in some ways, an expression of the Framers' fear that their special status as privileged elites was drying up. Sometimes, this was made quite explicit. North Carolina Governor Samuel Johnston said, “everyone who has the least pretensions to be a gentleman, is borne down per ignobile vulgus [by the common crowd], a set of men without reading, experience, or principles to govern them." An implicit goal of the Framers' at Philadelphia was to restore government by "gentlemen," rather than by "ignobile vulgus."
State executives
Imagine if the president of the United States were chosen by Congress for a one-year term, to be renewed (or not) annually. Imagine, furthermore, that this president had no veto. Imagine the Cabinet, too, were chosen by Congress, and lacked accountability to the president. Such a president would be pathetically weak.
But this scenario accurately describes the power of most state governors during the Confederation period. Weak executives were the defining feature of the state constitutions.
The Framers of the Constitution blamed the vices of state politics on these weak executives. Such a weak branch could not properly control the legislature. Referring to his home state of Virginia, Madison wrote, "our Executive is the worst part of a bad Constitution." Alexander Hamilton had the same thing in mind when he called for greater "energy in the executive." Strengthening executive power became linked in the Framers' minds with imposing a check on the populist politics of the states.
The Electoral College
The Framers walked into Philadelphia knowing they wanted to strengthen the executive and make it independent from the legislature — but that's about all they knew. It would be wrong to think the Electoral College was some carefully planned scheme. Quite the opposite. It was drawn up in haste in the last weeks of the Convention by stitching together multiple different plans. Madison later admitted the design owed to “the hurrying influence produced by fatigue and impatience.”
The one constant, agreed on by all delegates, was that the president should be politically independent from Congress. There were two general ideas for doing this:
A. The first idea was to have Congress choose the president, but to give the president a long term with no chance of reelection. It was hoped he would stand above politics, free from congressional pressure (perhaps like the Federal Reserve today). The idea of a 7-year term carried the day in the early part of the Convention, although terms as long 11 or even 15 years were suggested.
B. Alternatively, the president might be given a shorter term with more frequent elections; but in that case, Congress could NOT be permitted to choose the president — that would destroy his independence. But if not Congress, then who? Every option was on the table: various delegates thought he should be chosen by electors, by state legislatures, by state governors, even by a direct vote of the people.
Eventually, the Framers mashed together several plans. Electors would choose the president, following whatever procedures were dictated by the state legislature; but if no candidate received a majority, the House would choose from the top three candidates, voting by state delegations (i.e., the House would vote as though it were the Senate).
To be clear: nobody liked this plan. It really had just one advantage — it was able to get passed in the Philadelphia Convention. By stitching together so many different elements, this compromise offered something for everyone, and almost every delegate could find, in this morass of procedures, something he himself favored.
To summarize: the Framers at Philadelphia were deliberately trying to strengthen executive power, in contrast with the weak executives they found in the state governments. The Framers feared populist politics, but they associated populism with the legislative branch, and believed that an independent executive would add a touch of refinement. Hamilton predicted "there will be a constant probability" of seeing the presidential office "filled by characters preeminent for ability and virtue.”