Be sure to use FULL safety goggles, the tiny sharp shavings are dangerous to eyes.
I also suggest a dust mask.
This requires delicate work with a micro die grinder, using carbide bits to clean up the gnarled outer 2MM of the speedometer drive gear.
Or worst case attempt to carefully grind through the damaged cable stub, and clean up the square with jewelers files.
10pc Diamond File Set Files Needle Glass Tile Metal Watchmaker Jewelers Grinder | eBay
For me it is a:
Tedious, nerve wracking two hours (on average), and 95% odds of success.
Here is a good price on the tool and carbide bits you will need.
Dotco Air Pencil Grinder 60 000 RPM Carbide Tool Bits Die Making Machinist A | eBay
You will also need an In-Line Oiler, filled with marvel mystery oil to avoid burning out the bearings in this high speed tool.
Mini in Line Oiler Air Lubricator Tools 1 4" NPT Line Brass Compressor New | eBay
A bit of (new tool) practice on junk parts should give you the confidence to tackle this job.
.
__________________
ASE Master Mechanic
https://whunter.carrd.co/
Prototype R&D/testing:
Thermal & Aerodynamic System Engineering (TASE) Senior vehicle instrumentation technician.
Noise Vibration and Harshness (NVH).
Dynamometer.
Heat exchanger durability.
HV-A/C Climate Control.
Vehicle build.
Fleet Durability
Technical Quality Auditor.
Automotive Technical Writer
1985 300SD
1983 300D
2003 Volvo V70
https://www.boldegoist.com/