There's a datasheet of that one here, with all dimensions, so you can check if it is a useable replacement.
If it is: several sites say this part is obsolete, but at least one supplier (no affiliation) claims to have them in stock. Maybe it is still on the 3M website as well.
4 Pin Female Inline Microphone Connector: These circular connectors are
most commonly used for microphones, but they are rugged, multi-pin
connectors suitable for a wide variety of uses. Each connector is
keyed to ensure proper polarity. They provide a threaded locking ring
for reliable contact under extreme shock and vibration. These
connectors are great for mobile use and can handle both voice, data
and power applications. Includes a built in strain relief
This is more anecdotal than anything, but the Trackball Marble by Logitech was the first to use optical sensors in this way. I actually worked with some of the researchers that designed the first versions of those ICs, some of the historical pedigree is here. The one you found might be more recent versions of the design (and very likely proprietary to Logitech).
The original ICs were actually what is known as analog VLSI (aVLSI) optical flow sensors, these come from the field of Neuromorphic engineering. They do analog calculations based on the optical array that represents the movement of the optical field (loosely based off an insect's eye). This is the original conference paper (PDF download link) from the research team that created it: A CMOS Motion Detector System for Pointing Devices, Xavier Arreguit et.al.
You can see that Figure 1 of the paper very closely resembles the layout of the sensor you found.
According to the 1996 paper, the output of the sensor IC is two 5-bit digital words one for delta-X the other for delta-Y. It only uses 4-pins, two for power one for interface clock, and one for data output.
You should be able to decode the pinout by tracking the signals on the PCB, but it is clear that the large mounting pad in one of the two center pins must be ground.
Although the fundamental idea is similar to what Avago's sensors use, the principle of operation is completely different. Avago's design is fully digital, consisting of a low-resolution camera and digital signal processing circuitry.
Best Answer
It looks very much like this P10-010SLT-A-G by 3M:
Image from North Star Micro Electronics
There's a datasheet of that one here, with all dimensions, so you can check if it is a useable replacement.
If it is: several sites say this part is obsolete, but at least one supplier (no affiliation) claims to have them in stock. Maybe it is still on the 3M website as well.