A local machine shop could probably build up the steel in the worn keyway in the shaft with a welder and cut a new keyway for a good deal less than the new part cost.
What I'll probably do is replace the easily replaceable parts (key, spring, clamps, washers, gear), give it a good lubrication, and sell it (disclosing the worn part) and replace it with a battery-powered mower. I'm tired of dealing with gas machines. I'm under no illusion that a battery-powered mower will be as durable, but I'm just done with the noise and pollution of gas.
My electric cuts 19" and the push mower is about the same, maybe a little wider. Cheap battery mowers are 16", maybe even 14". 22" ones are available for $450 on up. I'd consider buying one of those if the batteries would last for 5 years. My experience so far with cordless tools is not positive.