An impact wrench can be used to remove the nut.
Some motors have two flat spots machined on their shaft right behind the sprocket which an open-end wrench can be used on to hold the shaft steady.
A piece of chain can be wrapped around the sprocket and held onto with locking jaw pliers to hold the shaft steady.
Most electric scooter and bike motor shafts have counterclockwise threads.
That's fantastic thank you, the chain idea is a great idea and I think that's what I'll need to do. Will that be sufficient enough to replace the nut once I've changed the sprocket? ie will it be tight enough after tightening using the chain method?
Yes, the chain and locking jaw pliers method will allow the nut to be sufficiently tightened. If the locking jaw pliers are on the chain tight enough it will provide a lot of shaft holding power.
That's great thank you again. I'll check back in with you as soon as it's done to let you know how it went.
Thanks for letting us know. It is great to hear that the nut was able to be removed.