have you welded the sprocket to the shaft before on these,Is the weld strong enough to handle the torque?
No I have not, and I only offer that as a bandaid solution since that machine would certainly have some age to it. It seems to be how some people "fix" stuff. The engineer in me would highly question the likelihood of that holding long term, especially if the splines are toast or super sloppy.
The application of torsion through that weld would be in shear and though I could probably spec a weld that could hold that level of shear, there are other factors at play such as off center axial forces from turning and with that big sprocket, it would be a lot.
If you are truly looking for a "fix" and putting the bolt back on is not practical, a tear down is needed. I don't know the situation or condition of the goods to make any call here. Could post pics for further thoughts. If the bolt broke in the hole, there are techniques to attempt extraction of that bolt but skill is needed because once you start screwing up threads, walking the bolt out becomes that much harder.
I have successfully removed countless broke off undercarriage bolts that were flush with the rail. But it only takes one wrong zap with a MIG to consider yourself F'd.