[Updated] Desoldering a roatry encoder

You need a decent soldering iron that won't loose to much heat when applied to the joint. Use solder wick and a flux pen also helps with lead free solder. Sometime you need to re-flow solder into a joint to melt the entire pool as with solder suck you can remove the top layers of solder but deep in the joint it's still solid and you cant get heat down to it any more. The main problem may be the ground plain as it sucks a lot of heat away. As a last resort you may need to score around the ground plain joint with a scalpel to reduce heat transmission or even use 2x soldering irons.
Try to avoid prolonged high heat as you may lift thin tracks.