The diagnostic port is on the drivers side fender. It’s a little cylindrical connector under a cap. Pins 7,8,9 lead to a coil pickup at the front of the engine that gives one pulse per revolution. On older w123 turbos diesels this is converted to a square wave using a tachometer amplifier and fed to a two pin tach pre 85. After 85 and on your car there is a 3 pin tach that takes the bell housing sensor output which is many pulses per revolution.
This is not how to fix your problem. Conceivably you could put in an older model amplifier and somehow squeeze in an older tach and you’ll have a tach. But this isn’t advisable. It’s way too much extra electronics.
So there’s an incompatibility there. On your car as well as on 80s gassers the diagnostic port was used to hook up a piece of diagnostic gear to check rpm or TDC.
http://www.peachparts.com/shopforum/attachments/diesel-discussion/42916d1175638043-1985-300d-ca-emissions-tachometer-repair-pictach.jpg
I was just pointing out that this diagnostic plug signal is not compatible with your dash gauge even though the same pickup is used to run the tach on a w123 turbo pre 85.
At this point if I were in your shoes I’d start at your sensor like you have. I think it is supposed to read off the ring gear. If you have an oscilloscope you can check to see if you are getting a pulse out of it and it is getting delivered to the electronic brain box on the passenger side of the dash. My guess is it isn’t. You’re probably right, something has gone wrong between your old flywheel assembly and new. But that is only a guess.
Basically you need a wiring diagram and a oscilloscope and you need to trace the signal. Somewhere between the gauge and trans it gets lost. Hopefully it doesn’t require pulling the trans again.
Make sure to check the little red fuse on top of the ovp relay if there is one. On my 300d 1985 it was burned out and that was what I fixed. Easy things first.