You aren't going to fit much of a wheel in a package with ~3mm of internal clearance (the package may be 5mm thick but you have over 1mm of top plastic, a 0.5mm flex PCB and 0.5mm steel back cover in there) and additional linkages would add backlash which in turn makes the dead zone larger while also adding more mechanical failure points and manufacturing complexity.
If you wanted to build an optical encoder in there, you would mould the slits into the sliding racks (no extra part or backlash) and decode that, though those slits would need to be crazy small to provide any sort of resolution on ~2mm of travel, you get maybe 10 ticks from end-stop to end-stop with mouse wheel type slot pitch. Position encoders used in things like mouse wheels have only one LED and two detectors, using slits in the optical housing to shape the beam(s) and receiver window whichever way the intended application requires.