I don’t know that I believe George Lucas actually thought the Republic wasn’t the “good guy” at some level.
A story of that “good guy” finally falling to the worst form of corruption, sure, but what would the plot have become if Anakin resisted the Dark Side? Palpatine gets found out, the Jedi realize they’ve lost touch and start an anti-corruption crusade but keep defending the status quo?
Not once do the works ever, ever wonder how a galactic society with apparently unlimited energy and a robot slave labor force has biological poverty. It never questions whether The Republic is inherently damaged, ideologically, it just yearns for some time where a Sith wasn’t running the show.
the Jedi realize they’ve lost touch
There’s the issue, and why the story works - the Jedi never would have found out their corruption. Yoda and Windu failed the order as Grandmasters, and it took near total annihilation in the form of Vader for them to return to their origins (ignoring Disneyverse BS like Jake Skywalker isolating himself).