Shift the ineligible candidate's votes among the others, and see if it affects the outcome. A do-over might be avoided if those left standing reach a settlement.
If the ineligible candidate was otherwise the winner, and 2nd and 3rd are close together, I see no way to avoid a do-over, in order to pick a winner. Same sort of calculus can play down-ballot, too.
Complicating things in a primary, there is no way for a court to know the delegate margin at the nominating convention. All any court has potential control over is the delegates selected by election in that state.
In what proportion and how do you show it's accurate? Damages have to be real, not speculative. Trump doesn't have it. Any suit would be thrown out. And I think Trump knows that, which is why he will shoot his mouth off about suing but will never actually file suit.