Thanks for your answers they’re all very interesting and made me realise I should rewatch the movies to better see the clues.
One thing that has always bothered me though, ever since I was a kid, is that even if the Jedi were deliberately portrayed as flawed it seems the movies prove them right in some of their ambiguous teachings. For exemple, concerning the « no-attachements » rule, watching AOTC as a kid I remember thinking the Jedi were assholes for banning relationships but then ROTS seemed to validate them because it was like : « see they were right, because a romantic relationship led Anakin to the dark side ». I know it’s not that simple, but as a 12 year-old that’s how I and I’m sure a lot of other kids my age understood it.
I just wish there was a line from Yoda or Obi-Wan at the end of ROTS that acknowleges the Jedi’s errors to make it clear.