Given the many dangers of government power, the best form of government is one in which government power is most restricted.
One might well ask whether, given this danger, it would be best if there were no government at all. There are two problems with this.
First, there appear to be some services that only government can perform. The free market requires an absence of coercion. But some some goods, such as national defense, police protection, and courts, depend on coercion. It isn't clear that the free market can provide these.
These goods appear to be collective goods, that is, goods that people benefit from whether or not they pay for them. There is a free rider problem, where people can benefit from something without paying for it. If the military prevents an invasion of the country, it benefits everyone, not just those who paid taxes. Other goods including roads and clean air appear to fall into this category.
The second problem is that it doesn't seem that having no government is possible. If there were no government, criminals would prey upon good people. Good people could resist, but criminals would organize into gangs that would make individual resistance difficult. To defend against this threat, good people would have to organize for defense, but any organization of significant size would face the free rider problem. Thus it appears all but inevitable that there will be an organization with a near monopoly on force in a given territory, i.e., a government. This is true whether or not the purpose of the government is to protect people or exploit them, or something in between.
This process can be seen in action on those occasions when a weak government collapses. Inevitably, various factions vie for power until one of them defeats the others. A state of anarchy can only persist when there is a very low population density and transportation and communication are relatively time-consuming.
Thus it appears that the existence of government is inevitable. However, this does not change the very real harm that government causes. Thus if one who wishes to minimize the harm the government causes should advocate that the government be just large enough to prevent a worse government from taking over, whether by collapse or invasion, and no larger. This can be called minimal government.
How exactly to achieve and maintain a minimal government is a difficult problem. Government naturally tends to grow in size and power. As Thomas Jefferson put it, "The natural progress of things is for liberty to yield and government to gain ground." This is because of government's near monopoly on force, and its greater organization.
What is needed is some mechanism to keep government to its proper size and scope. Unfortunately, it appears unlikely that any such foolproof mechanism exists. This is because any such system would ultimately depend upon fallible humans to implement and maintain it.
But while no such system is foolproof, there are a number of procedural mechanisms that can limit government power and make the growth of government less likely.
A government that is structured in such a fashion is a republic. A republic may have democratic elections, but it does not embrace grand theories about democracy. Democratic elections by themselves do not necessarily lead to freedom.
One of the most important mechanisms to limit government power is a constitution. A constitution defines the structure of the government and grants it power to do certain things. But for a constitution to limit government power, it must restrict what government can do. A constitution that limits government power must be written and fixed. If the constitution is nothing more than tradition, or if it is a "living constitution" that can be changed at whim, then it provides little protection. A fixed written constitution provides a reference that can be cited in public debate, so that people are not forced to argue every question from first principles.
Along with a constitution, a bill of rights is an important mechanism to protect liberty. A bill of rights lists explicitly some of the rights of the people and prohibits the government from violating them. It also provides an important reference for public debate.
Another valuable mechanism to limit government power is decentralization. It divides power and reduces the danger that a single faction can seize power. If a faction seizes control in one region, people can leave, and if it seizes control of the central government, the regional governments can resist.
Within a given level of government, a separation of powers can help to protect liberty. Separation of powers means that the executive, legislative, and judicial powers are separated, so that winning one election doesn't give one faction control of the entire government. A single faction must show sustained support over time to win control of all branches of the government.
Checks and balances go along with the separation of powers. Checks and balances are various powers that different branches of government have that affect each other. These can include the power of appointment, the power to spend money, the power to pass legislation, the power to veto it, and the power to investigate other branches.
Another important protection against government power is gun rights. In the extreme, if the government becomes tyrannical, the people can resist it with force. Short of that, they may need to resist individual branches or rouge agents of the government. Beyond that, gun rights send an important message that the government exists to serve the interests of the people, and not the other way around. Gun rights can prevent democide, which killed 262 million people in the twentieth century.
Because the government has the power to arrest and imprison, civil liberties are essential. They help to prevent government from taking away the liberties of people unjustly. To maximize liberty, government must punish criminals while protecting civil liberties.
As the saying goes, the power to tax is the power to destroy. Procedural restrictions on taxation can help to protect liberty. These can include requiring a supermajority in the legislature to raise taxes and requiring a public vote to raise taxes.
In conclusion, since it is virtually impossible to have no government, the best protection of liberty is limited or minimal government. There does not appear to be any foolproof mechanism to protect limited government. However, various procedural mechanisms including a constitution, bill of rights, decentralization, separation of powers, checks and balances, gun rights, civil liberties, and limitations on taxation can help to protect liberty.