Warning: this article contains spoilers for Star Wars: Obi-Wan #3!
Thanks to Obi-Wan Kenobi's reflections on his past, Clone Wars as the ultimate Jedi trap, and they certainly proved successful; they allowed him to maneuver himself into a position of near-absolute power while the Jedi remained occupied on the Outer Rim. It all built to a climax in the lethal Order 66.
Order 66 was Palpatine's masterstroke. The Jedi had fought alongside the clones for years, and they trusted them completely. What's more, the use of control chips meant the clones had no initial ill-will towards the Jedi - they were simply following orders, sending no signals of aggression or malevolence through the Force. The few Jedi who sensed anything was wrong picked up the deaths of their fellow Jedi, and they were too paralyzed with shock to save themselves. However, there was another element to this trap that destroyed the Jedi as a concept even as they fought for a better world.
Star Wars: Obi-Wan #3, by Christopher Cantwell, Alessandro Miracolo, and Frank William, sees Obi-Wan Kenobi reflect back on the Clone Wars - finally recognizing the full scale of the trap. "All war - in part, at least - concerns dominion," he has come to realize. " As servants of the Force, we learned that it presides over all, like an unseen current. To seek any kind of dominance is to misunderstand the very nature of the Force." By fighting in the Clone Wars, by becoming warriors and warlords rather than servants of the Force, the Jedi betrayed the light side long before they were killed.
Pain and fear cuts a Jedi off from the light side of the Force - the shroud of the dark side that the Jedi itted had fallen across the galaxy. Participation in never-ending military campaigns naturally meant the Jedi began to increasingly focus on domination, moving them closer to the dark side. Some Jedi sensed the problem, and the Jedi suffered many deserters as the Clone Wars continued. At the same time, many of the Jedi who flourished during wartime were those closest to the dark.
This may well explain why Palpatine was able to break so many Order 66 survivors, transforming them into his Inquisitors - his Jedi-hunters. The Clone Wars had already pushed them to the brink, the anguish of surviving Order 66 would have taken them over the edge, and no doubt Palpatine then knew how to use the Force itself to complete the breaking. The Clone Wars truly were the ultimate Jedi trap, perfectly engineered to break the Jedi, and it's a matter of record that they succeeded. Only a handful of Jedi managed to both escape the clone troopers and cling to the light side of the Force, and those who did soon found themselves hunted by their fallen brothers and sisters. The Star Wars prequel saga ended in tragedy for the Jedi, but it wasn't just Order 66 that wiped them out, but the Clone Wars that broke them in every possible way.