Over the last few days, I made a new shaft for the drive gear and soldered the drive gear to it. I also ground down the gear a bit to make it thinner so it would fit. I noticed that there were two different styles of (interchangeable) window regulators on the car, and the replacement gear assembly was apparently designed to fit the other style. Finally, I tack-welded the new drive gear assembly to the main regulator assembly. It was originally riveted in place, but it would be impossible to install new rivets because they would be blocked by other parts of the mechanism.
Anyway, it’s all fixed now, and I can put it back up in the attic until sometime next year, after the car has been painted and the window parts (and glass) can be re-installed.