Most electronic speedos use a magnet mounted on the wheel (usually in the brake disc carrier) and a sensor mounted where the magnet will pass it every time the wheel rotates. This is not terribly difficult to do and is a lot more reliable than a cable spinning in a housing.
Here's how I did mine
Speedometer sensor mounting (2 piston caliper)
On a TI bike the connection for an electronic tach is easy, just connect the instrument's tach sense wire directly to either the blue or yellow wire at the coils. It isn't that hard with CDI either but I can't remember off hand where to connect it.
FWIW, I have Danmoto 180 instruments on both of my bikes. I used to recommend them highly because they are attractive, well made and even have wires that mostly match Honda's colours + a really good instruction sheet. I don't recommend them quite as highly these days because I needed a replacement for one of the rubber buttons and Danmoto told me they didn't have parts and were discontinuing all of their speedometers when current stock ran out. (I was able to salvage arubber part from something else and modify the 180 to use it).
But if you aren't concerned about that you can still order one for $70 US (half price)
Danmoto 180º Digital Cockpit [SP-00008] - $70.00 : Danmoto, Motorcycle Racing Parts & Accessories
BTW: Welcome to the forum. Please add your location to your profile and your bike's model and model year to your signature so that you don't have to remember to tell us every time and we don't have to keep asking when you forget.
And welcome to the world of antique vehicle ownership (they own us, not the other way around). Your bike has had about 4 decades of Previous Owners who may or may not have done the maintenance necessary to keep it safe & reliable so it is highly recommended to download the Factory Shop Manual for your model (available through the CX Wiki - link in my signature) and go through all of the service procedures, regardless of whether your bike has reached the specified mileage. I also recommend looking on all rubber parts with suspicion because rubber does not age gracefully. Check the date codes on your tires and replace them if they are over 5 years old no matter how good they look & feel because old rubber simply cannot flow around the irregularities in the asphalt well enough to grip, especially if it is cool or wet. If your bike still has the original rubber brake line(s) (should be replaced every 2 or 3 fluid changes = 5 or 6 years) I recommend shopping for modern stainless braided ones (they last practically forever and double the life of the fluid).