Both of them looking back thought that repeating a year was a good thing for them, they went from being struggling average/below average students to top of their class and regained their confidence.
I think it really depends, in a place and time where repeating classes is more common, it maybe doesn't really destroy confidence as much whereas in areas where it's rare, then the psychological impact is much worse.
Also, one thing to note, both of them, in their experience with education, saw much better results when children were separated by level than when classes were mixed together for exactly the reason the OP mentioned. A top student can help bring an average student up but when there are both top students and very below average students, the teacher has to make the choice to either focus on the below average student or the top students and neither of those choices are good.
In France, we've had a push toward lowering the overall level and removing any elitism at schools. This has increased the amount of kids who graduate from high school with the Baccalauréat which is needed for university but has lowered the level of kids actually going to university (especially at engineering schools and elite institutions) and reduced the value of a university degree. It's a bit similar to what's happening in the US in STEM and I think it's a bad calculation for the long term competitiveness of the country.
Come on, of course it hasn't. Entry requierements haven't changed.
The highschools providing the largest contingents of students to these elite institutions respect neither the national curriculum nor the ban of sorting students by ability without any consequences. Unsurprisingly the two most famous of these highschools are also exempt from the French purely geographical students draft and the places most politician children attend. As usual in France, the rule for all is not the rule for the elite.
In effect, the dumbing down of the national curriculum has just made a system which was already one of the most unequal in Europe even more unequal. But everything is fine. The French system only uses entrance exams and entrance exams are always fair, aren't they?
All countries use entrance exams, it's not something that specific to France and of course there's an inherent unfairness to them, kids from better educated families are always going to get better results. In fact if we were talking about fairness then the disappearance of boarding schools (internats) have actually increased inequality. There was a time when a lot of kids spent the week in boarding schools, for kids from families with less focus on education (like my grandmother who kept telling my mum that she should stop reading because it'd cause her headaches), it removed them from non-optimal environment and put them in situation where they had better access to education. But I'm not sure that's desirable or optimal :)
Usually it was kids that had some discipline problems. Perhaps ADHD, etc... but at the time, no-one cared about those aspects as school psychologist were not a thing at all.
If you failed more than one year in a row, then the teachers will just give up on you and let you just slide the next year as long as you just showed up.
But usually it did not happen that often. When it did happen, it usually meant someone will change schools to a less demanding one (if in high school). So for example you may leave a gymnasium and go to a school for mechanics.
In elementary school it did not happen except for serious disciplinary problems. People with mental problems were able to have special programmes that tailored to their needs, so this did not result in repeating a year.
Teachers did not really like the idea of having someone repeat a year, so if you had a decent attitude you could get a passing grade but you had to put in the effort. This "effort" part is what is in my opinion biggest different, Eastern Europe schooling required you to put in a lot of work, if you were talented you didn't need to use so much time, but if you weren't natural at math, you had to put in plenty of hours to get decent grades. Problems usually were not of the sort that can't be learned through "brute force".
I've done some teaching on the side and when I was teaching a guy in a "US" school for children of diplomats, difference was that their problems were usually much more freeform and required deeper understanding but once understood, used primitive math or physics methods. Our normal schooling was different, it used advanced math or physics but the problems were often times many variants of the same problem (which allowed for brute force learning). Honestly I think that it would be the best to have both, as many of my fellow students did not really understand the material we studied but they could brute force it.
Edit: Switzerland has a different approach where children are segregated by their ability starting from 7th school year. So you go to Gymnasium, A level, B level, C level.