If the oil lock piece is stuck on the end of the damper body then I get an adjustable wrench and set it on top of the edge of the oil lock, and then give a sharp tap down. The only thing holding the oil lock there is friction and any threadlock that has made it's way there, an it doesn't require much force to move.
On the other hand if we are talking about unscrewing the damper bolt from the bottom of the fork and the damper is spinning inside the fork, the best tool is an impact gun. The bolt screws into the base of the damper, and the damper can spin within the fork, and the damper base can also spin within the damper. ALWAYS crack loose the damper bolt BEFORE you disassemble the fork, as the fork spring pressure provides some force onto the damper and minimises spinning.
If all else fails, apply heat to the damper bolt head to loosen the threadlock, and then pull up firmly on the damper shaft, which pushes the damper base harder onto it's circlip to create more friction to prevent spinning, and use the rattle gun.