Your point about the injury risk going up is valid. That being said going to failure and beyond is extremely effective way to train.
As I mentioned in another comment a possibile way to mitigate the risks is to reduce the load and make the exercise harder and increase the time under load by slowing down the exercise.
Also it's a good idea to swap from a higher risk exercise to a safer one to crank out the last reps. For example from squat to leg press.