I have seen sockets for sale that might work. I think they are designed to remove four wheel drive axle nuts. they look like a giant drag link socket with the middle part ground off.
Actually I made something for a similar job. The rear sprocket set on my bicycle was held on by a slotted nut. I took a short piece of water pipe and hack sawed filed two lugs on one end.
Be careful I have no idea if it may be left hand thread?
Bill D.
Freewheel removal tool for bicycles
https://www.amazon.com/Mdvora-Coilov...jEALw_wcB&th=1
4x4 axle nut sockets
https://www.amazon.com/dp/B0C5R95N47...9ocXBfc2hhcmVk