I just do arm circles and stuff, but what really helped my joint issues was dropping my weight down to almost nothing (5lb max) and doing 4 sets of 25 reps. Once I could do that without any discomfort, I increased the weight by 2.5-5lb.
When I passed 20lb, I moved to 4 sets of 15 reps.
My hypothesis was that by doing this, I'm getting my joints slowly used to moving more and more weight, while also building all of the supporting muscles that you need to safely lift heavy.
Also, it's possible to over stretch before a workout, especially if you're doing static stretches. I mostly stick to dynamic stretches pre workout.