I've struggled with this as well and I'd love hear ideas on the topic.
Ideally you don't want the shaft to spin since it can damage components inside the unit. So what does one do?
To loosen... in the past I've always initially tried zapping the nut off with just an impact. Sometimes it works but not always. The shaft usually always spins to some degree (a lot if the nut doesn't break loose). I've never damaged a shock this way but I can see how it's possible. Try at your own risk.
I still use an impact, but I also get a small and thick section of rubber hose to place around the very top of the shaft and hold it with some vice grips like this:

Damaging the shaft with the vice grips is a risk, and the shaft can still spin, but it seems to do the trick without damaging anything, especially if the nut is a little stubborn to break loose. Try at your own risk.
I think a good strap wrench would be best in place of the vice grips / hose, but I haven't tried one yet. Something like this with a rubber strap:
https://store.snapon.com/Strap-Wrenches ... 48185.aspxWhen tightening the nut never use an impact. Tighten to spec with a tq. wrench while using the same method to hold the shaft. Ideally a new oem nyloc nut should be used each time.