I don’t think he’s going to win in court - they’ll just simply drag things out slowly and then it will all go away when they no longer need it. But this would certainly make him win at the ballot box - among Republicans, at least, since even those who detest him will now vote for him.
The left must know this and perhaps somehow it is actually part of their plan.
They believe they can beat Trump like last time. There are so many hammers to beat Biden with, but this will distract from that and damage Trump in the general.