Somewhat coincidentally the mechanical encoder broke in my Cherokee earlier this year, above about 6,000' the readout was intermittent (as opposed to erratic, it just didn't report sometimes), and then above 8,000' nothing at all was reported.
Unfortunately not being an accredited tech, and not having the pitot gear to test it anyway, I left it to a commercial shop... who concurred with my findings, and completely disconnected it and sent me a quote for either $750 for a direct mechanicsl replacement or $1,500 for an up to date electronic unit. Regretfully I went for the latter.
Unfortunately, here in the Uk once a certified tech finds a fault, it becomes reportable and they have to disconnect it completely even though it was working for the vast majority of cases: here in the South East Uk, the opportunities for flying VFR much above 4,500' are pretty limited due to massive swathes of class A airspace above.
I wish I'd taken a look at it myself after the event, who knows, a simple bit of contact cleaning on the mechanical encoder might've been all that was needed. Next time I'll know better, these days your average shop won't be interested in a repair.