How do you think they are doing it? Are they just counting and recounting adding new ballots each time trying to get a good winning ratio?
It's a primary vote, not a general election one, and they're doing "preference voting" (meaning you don't just pick who you want to win, you rank every candidate in order of your favorite to your least-favorite), and there's so many ways to fuck with that kind of counting to make things go whichever way you want.
If I had to guess, they'll carefully scrutinize every ballot that's "not favorable" to their preferred outcome and find any excuse they possibly can to spoil them (i.e. if the voter accidentally wrote the same rank for two candidates, etc.) while ignoring any similarly bogus ballots for their preferred outcome, then pull the tried-and-true "magic car trunk full of 'found' ballots" trick in any precinct where the rigged winner needs "help." Bonus points if there's more than 100% voter turnout and a wild last-minute swing in one candidate's vote count.
I don't know if they're allowing party observers (or press or public monitoring) either. If they're not, they can rig it any way they like, right down to just straight-up lying about the numbers ultimately reported by the machines (or just altering the records directly, which is possible if the machines are set to "no encryption," which is almost always the case -- your government tax dollars at work). Then if they're questioned later, it's too late to catch them, as the paper trail will have either been destroyed or modified.
And in case you're wondering why the machine-provided encryption (on the storage medium) is almost never used, the sad truth is that if the machines collectively decide a card is unreadable, it can probably still be read by a regular PC with a compatible slot, and you can only get the raw numbers if it's stored in cleartext. The choice is between discarding potentially thousands of legitimate ballots due to a simple electronics failure but keeping it all encrypted end-to-end, and recovering most (or all) of the data intact in the event of failure at the cost of it being absurdly insecure, and the gov't usually chooses "don't lose the votes," because reporting zeroes across the board for a precinct raises major red flags.
It's worth noting though that it's not really the voting machines themselves that are the main point of vulnerability. It's the processes surrounding them. If everyone works in pairs or in groups, it's substantially harder to surreptitiously tamper with a machine, its storage, security stickers, or usage. It's much harder to "swap out" storage cards enroute to the reporting center if you transport them in groups. It doesn't matter whether the storage cards are encrypted or not if there's never an opportunity to be alone with one of them to modify what's stored on them.
That only falls apart when multiple people are involved in a scheme to rig it together, or the entire county election office is compromised. It only takes one whistleblower (with proof) to raise doubts, but even then, getting the press to pay any attention (much less report it) is a nightmare if the wronged candidate is one the press hates. It's why neutral (and public) observation is so important, so that even if an entire election office is crooked, outsiders can make a stink. Any time an office refuses to allow that, they're up to no good. Always.