It was certainly intentional:
The prequel trilogy is based on a back-story outline Lucas created in the mid-1970s for the original three “Star Wars” movies, so the themes percolated out of the Vietnam War and the Nixon-Watergate era, he said.
Lucas began researching how democracies can turn into dictatorships with full consent of the electorate.
“In ancient Rome, “why did the senate after killing Caesar turn around and give the government to his nephew?” Lucas said. “Why did France after they got rid of the king and that whole system turn around and give it to Napoleon? It’s the same thing with Germany and Hitler.”
“You sort of see these recurring themes where a democracy turns itself into a dictatorship, and it always seems to happen kind of in the same way, with the same kinds of issues, and threats from the outside, needing more control. A democratic body, a senate, not being able to function properly because everybody’s squabbling, there’s corruption.”
“The story being told in ‘Star Wars’ is a classic one. Every few hundred years, the story is retold because we have a tendency to do the same things over and over again. Power corrupts, and when you’re in charge, you start doing things that you think are right, but they’re actually not.” – George Lucas in 2005
“[The Jedi] sort of persuade people into doing the right thing but their job really isn’t to go around fighting people, yet they are now used as generals and they are fighting a war and they are doing something they really weren’t meant to do. They are being corrupted by this war, by being forced to be generals instead of peacemakers.” – George Lucas for E! Behind the Scenes - Star Wars Episode III Revenge of the Sith