pretty sure the mileage is stored with the cluster itself.
a. you can try to fix the loose connection on the board. or
b. you can try swapping the display fram a working cluster, or
c. the dealer should be able to change the mileage on the new cluster to match the old one.