Each precinct was overcounted? That sounds like it is the voting machines.
During a post-canvassing audit of the Butte-Silver Bow County primary that was held in June, election officials suspected an overcount of more than 1,000 ballots, prompting a judge to order a recount. The recount discovered that 1,131 more votes were counted than voters who voted. Data shows a very similar number of votes in each precinct was overcounted. https://thefederalist.com/2024/09/06/montana-county-declares-wrong-winner-after-failing-to-compare-total-voters-to-ballots/
Montana County Declares Wrong Winner After Overcounting Votes
A Montana county declared the wrong winner in a race after overcounting votes. Election officials are not entirely sure what happened.
https://thefederalist.com/2024/09/06/montana-county-declares-wrong-winner-after-failing-to-compare-total-voters-to-ballots/