Well Lucas wrote the Jedi to be basically flawed. Their Order was very orthodox and collective on a obscene level. By the time we are introduced to them in TPM, despite being at a high point in their power they are also in the process of falling from grace. When young Anakin is brought before the Council, it was kinda like Jesus being brought before the priests while on trial. By each movie, they lost their way, they were consumed by their great hubris, arrogance and lust for power, the way of the sword was too easily selected. In their case they feared losing control, control of the Republic, the Force and civilization with them at the top.
There is a Sith shrine buried under the Jedi Temple on Coruscant that has been for thousands of years. And slowly corrupting the Jedi and diminishing their ability see clearly and use the Force. Luceno introduced it in his Tarkin book but it apparently went back to an unused TCW Season 6 or Season 7 arc with Ahsoka facing off against Sidious under the bowels of the Jedi Temple.
But as far as the Jedi being evil, corrupted by evil yes, including by the Sith. The great Sith plan that Sidious inherits from Plagueis and eventually executed. But Sidious is nutcase, and makes the same mistakes whether you count Dark Empire or the Sequel Trilogy or both, its the same outcome for him. But the Jedi and the Sith are like an oroborus, constantly devouring eachother in the symbolic 8 configuration, an infinite struggle. Too much light and too much dark, is chaos. But Star Wars always has a Light Side ending, its defaulted to be essentially one dimensional . Good guys have to win.