Don't presume it's a problem with the sensor itself or with the hub. Very often, sensor electrical failure faults are caused by a problem with the connectors where the sensor plugs into the wiring harness. That can be addressed by cutting out the connector and splicing the wires together. That can be done by soldering and using heat shrink to cover the solder joints, using heat-shrink butt connectors, or the newer solder seal connectors.
I’ve had these faults over the years on two of the four circuits. After cutting out the connector and splicing the wires didn’t correct the fault, I checked out the next link in the chain (i.e., the electrical circuit). I simply removed and reconnected the connector at the ABS computer. That solved the problem.
There are several reported instances where simply disconnecting and reconnecting a connector solves an electrical fault. This is particularly well known for SRS faults. In my case it worked for the wheel speed sensor fault. I don’t know whether or not that is because after 20+ years some form of “microcorrosion” can form, inhibiting the connection, but perhaps the friction or scraping of unplugging the connector is known to work.
When addressing a problem like this, always start with the easiest/least expensive solution and work your way up the scale from there. Yes, there may be a problem with the hub, but replacing the hub is the most difficult/most expensive possible solution.