Sounds familiar. I had a 2009 with manual transmission and at one point the speedometer stopped working. Odometer stopped too. Well, it was intermittent for a while and then stopped completely. My car was pretty basic, no ABS, and like I said it was a manual.
The manual transmission cars have a gear driven speedometer and the gear is plastic. I'm talking about the gear in the output side of the transmission. That was my problem. A local dealership told me that they had seen several cars where the gear just wore out and needed replaced. When a tooth or two gets worn down it can be intermittent. Hit a bump and it may start working a bit, or it turns slower than it should.
Anyway, they tried to order it, but it was back ordered, so I found one on ebay, brought it to them, and they changed it out. I may have been able to do it myself easily, but it was hard to get to. Supposedly it mounts on top of the transmission. It might be easier to reach if you get the car on a lift and reach up to change it. Not sure though, I never watched them do it.
The one I got was for a Kia Rio, but it worked fine. The part number was 4362123550
There are several you can buy on various sites, but not sure which are decent or not:
I looked at the pictures of the links you listed. On mine, there is a sensor on the firewall side of the transmission down about 1/2 way. It has a three pin connector. That is the one I replaced. The other possible sensor is right under the air cleaner box and has a two pin U shaped connectors. Both of those connectors are connected thru another connector to the bigger main wiring harness. I don't see a "cable" that goes from either one thru the firewall.