I work (in semi retirement) at auto auctions.
I guess there is a chip of some kind in digital odometers that keeps its memory even with a discharged battery.
But they do go dark sometimes. And makes the car much less valuable to dealers.
Sometimes you can pound on the dashboard and the odometer will come back to life for a few seconds and display correct mileage.
What causes a dark odometer ?
I black screen sounds like a display problem (i.e. - it’s not the odo chip that’s bad, it’s the display, or the display driver). Like any electronic device, there are a zillion ways for these to fail.
Probably what’s happening there is that the solder or ribbon connection that attaches the digital display to the circuit board behind the cluster is coming loose.
Chances are the broken component isn’t the one that actually stores the mileage. On some cars, the mileage is stored in the ECU so if you change the cluster the new one will display the correct mileage. On others, you can change the display itself without replacing the part of the cluster that actually stores the mileage, or you may simply be able to clean up or snug up the connector.
The service manual will probably just say replace the cluster and then use the scan tool to reprogram the odometer, but the enthusiast forums* out there are usually good resources for actually fixing the individual parts of the cluster. Of course, just getting to the cluster isn’t an easy job on most cars these days.
*GreasyJack’s vehicular corollary to Internet Rule 34: If a mode of transportation exists, no matter how obscure or terrible, there IS a forum with at least a few rabid enthusiasts.