Before reading this comment, I don't start a flame war, I'm trying to be as unbiased as possible. Please don't let this offend you in some way, it's purely speculative.
To address the OP's corruption issue, fear generally stops that. People generally fear death. Give government the power over one's life and they'll generally won't disobey. However, it's a two-player game. If the people under you feel that the life you're giving them isn't worth living, rebellions will happen. The government needs to treat it's people kindly so they do not have a reason to hate it. However, the government is run by people, and people aren't perfect, so corruption can still exist (ie too much taxation of the Americas cause them to revolt. Otherwise they were mostly content with Britain). A second net of fear is often necessary, to try to catch those pass the first. Religion generally fills that role. Give people a moral system and they'll essentially be "better" people. More than that, give people the idea of an eternal punishment for doing "wrong" and fear will control them. There are a few characteristics this religion should meet (meaning it can't be just any religion) to achieve a non-corruptible state. One, it needs to have doctrine that are peaceful (ie Do not kill people, do not steal, do not rape, etc.) with eternal punishment if broken (Hell, Karma, etc.). And two, people need to truly believe in it to work, including the leaders. This second point is especially paramount. If the people don't truly believe in it, then they don't feel as compelled to follow it and you still have corruption. If the leaders don't truly believe it, and are smart enough to see the opportunity, they'll become more powerful than the government. If the punishment is bad enough, people will do anything they are told to to avoid it. In the hands of a "good" leader, you see times of peace and understanding. In the hands of a "bad" leader, you see the Crusades, Salem Witchcraft Trials, 9/11, Sunni/Shiite Conflict, etc. (I don't mean to single out two religions, I couldn't think of any other events off the top of my head). And while this system of two nets should stop almost all corruption, it won't stop all of it. At this point, most everyone is fear enough for their life (either physical or eternal) to not oppose. However, outliers do exist. If neither system (religion or government) is corrupt and the people are well, this person is labeled "crazy" as there is no reason to rebel (and generally, they are mentally unstable). Those people are then exiled or executed.
The other thing one must consider is the environment this system is in. In a perfect, stable, isolated society, this system should be able to work indefinitely (so long as you can contain the genuinely crazy people). However, every time an outside element is introduced to the system, while the chance is slim, there is always the possibility of the system breaking, especially if you introduce too many at once. Cultural exposure, religion and government not seeing eye-to-eye, opposition to a war, as well as other reason. And though it is a slim chance, it will never go away. The root cause of these issues are disease and famine, two issues that we may never eliminate.
Thomas Malthus does an excellent job of explaining this final point in his essay,
the Principle of Population, which is a good read and I recommend.