just had to do this on my brothers escos yesterday.
the hole in the wheel for the nut wasn't very big, so counldn't get an impact socket over it (black sockets). If you have space, then this is always the easiest.
If you have access to a welder, you can weld another nut, or bolt onto the end of the locking nut, and undo it that way.
Or what we did yesteday, was use a chisel, to break some of it off, then chase it around until it undoes. This made a bit of a mess of the wheel on that hole tho.