I hate to see any athlete get injured, but that is part of the risk one takes with a sport like gymnastics. There is a lot of jumping, flipping, and sometimes landing in a situation where being even millimeters off can lead to a serious knee or ankle injury. There isn't much that can be done about this without fundamentally changing the sport, and I don't think even athletes would be on board with that.
Injury is an inherent risk of any sport, and there's no reason to think Olympic gymnasts are different from other athletes in this regard. Samir Ait Said's injury in the RIo Olympics is the latest example of a major injury at the Olympics, but this one incident doesn't show that gymnastics is less safe than other sports.
Olympic gymnasts are absolutely at serious risk for injury, but who isn’t? A pedestrian has the same odds of getting hit by a car as the gymnast has of throwing something out of whack during a random bar, pole or tightrope oopsie . If God has it written in the plan, then it will happen regardless. People can’t spend their lives worrying about it.
Olympic gymnasts are at serious risks for injury. A French gymnast broke his leg during the vault. Vaulting is a very dangerous sport because if something goes wrong, serious injuries, even broken bones are likely. Gymnasts must take extra precautions to ensure their safety. Even then, no one can guarantee safety for them.