Been there too. After I had my MCL and meniscus torn Dr.s told me to forget about powerlifting all together. An I did... For a little while. And even when I got back into it down the road, I still had problems. But baby steps is what it took to overcome it. I did a lot of stability exercises on a bosu ball and balancing exercises with plyometrics at first to prepare my lower body to be able to handle squatting or deadlifting again. And honestly, since then, no real issues. The only time issues get in the way now is when I would lose proper form due to over exertion, or just lack of focus. Sometimes it's just knowing what is pushing your limits and what is beyond your limits and not letting your ego walk in front of that reality.
Everyone is free to do what they want. But if I listened to the doctor back then, I would never be where I am today. Most doctors are going to tell you the safest and sure fire way of preventing pain or injury, and most of the time it's gonna be... Well stop doing it. Which is true, If something causes you pain, stop. Plain and simple. But if it's your technique that is the problem, you can't blame the exercise. Maybe it's a flexibility issue, maybe it's a physical disability, whatever it is there are ways to work around that.
But it's all about baby steps and proper warm up /stretching as well. Don't jump into a squat rack, load it with 400lbs and expect to knock out 10-12 reps an not think your body is going to react negatively to the stress, because more than likely it will.