Ironically, some of these types of issues can be exacerbated by machines. They often limit you to a fixed range of motion which doesn't line up with your anatomically natural range of motion.
Obviously limitations from injuries are extremely specific to the individual, so your issues may legitimately cause some barbell lifts (particularly bench presses) to be a bad idea. But I do also personally know of a lot of anecdotal evidence that points to freeweight exercise reducing the impact of people's injuries: e.g., knee pain from squats in a smith machine disappearing when performed in a power rack.