The most legally fraught part of the Russian “collusion” probe now revolves around payments to an American porn star.

As of yet, instead of a dastardly scheme to participate with the Kremlin in the hacking of Democratic emails to subvert the election, prosecutors have uncovered a dastardly scheme to try to keep from the voters — as if they weren’t already aware — that Trump is a womanizer.

The advantage of the story of the hush payments to Stormy Daniels and Karen McDougal is that they actually happened, and always passed the plausibility test.

To credit the payoffs, it didn’t require believing in a well-coordinated scheme between a foreign-intelligence service and the most shambolic presidential campaign of the modern era. All it took was imagining Donald Trump, Michael Cohen and a checkbook.

Everyone should agree that these payments were sleazy. But that’s not the live issue here. Because Democrats want to see Trump impeached or even jailed, the question is whether he can be successfully prosecuted for the payments after leaving office.

The law, and common sense, suggest the answer is “no.”

The idea that Trump is going to lose re-election in November 2020, then, having suffered the humiliation of getting booted by the voters, get indicted and stand trial on a dubious campaign-finance violation dating from 2016 is fantastical. This would be a banana-republic move, and is more a Democratic revenge fantasy — or should be — than a realistic scenario.

There are major legal obstacles to Trump’s prosecution. One is whether he had the requisite intent of violating the law, and here the standard is very high.

The other is even more fundamental. Bradley Smith, a former chairman of the Federal Election Commission, argues persuasively that the payments don’t constitute campaign contributions.

Federal law defines a contribution as “anything of value made by any person for the purpose of influencing any election for Federal office.”

That seems straightforward enough, to be sure, but Smith points out that another part of the law defines what is an expenditure for personal use, namely any “expense of a person that would exist irrespective of the candidate’s election campaign.”

“Irrespective of the campaign” is the key phrase. It is meant to keep campaign monies from being used for things that might influence a campaign, but that a candidate would spend on anyway — clothing and mortgages are cited as examples.

Payments to mistresses aren’t, but the rules weren’t written with Trump in mind.

He didn’t undertake his flings with Daniels and McDougal as part of his campaign, and it’s easy to imagine him paying them off even if he wasn’t running. He is a past master at non-disclosure agreements, after all.

Michael Cohen made a noteworthy point in his sentencing memorandum. He said he acted to squelch stories that would “adversely affect the Campaign and cause personal embarrassment to Client-1 and his family.”

The latter would have been a strong incentive to buy off Daniels’ and McDougal’s silence, regardless. Indeed, Smith, the former FEC chairman, makes a telling point: If Trump had paid the women with campaign funds, his critics would certainly be screaming that he’d improperly diverted campaign resources for personal use.

There are key differences, but the case against Trump is a close cousin of the failed campaign-finance prosecution against John Edwards for payments to his mistress.

In that case, two former FEC chairmen said they would have advised Edwards that the payments weren’t campaign expenditures.

The ethics outfit Citizens for Responsibility and Ethics in Washington filed a brief opposing the prosecution and noting some of the same absurdities that the case against Trump raises. If any payments to maintain a candidate’s image are legitimate campaign expenditures, can a candidate who wants to present himself as a family man pay for child care with campaign funds?

With Trump, in the absence of evidence of something like Russia collusion, his opponents will work with whatever material they have, no matter how tawdry or removed from the alleged offense that got the investigative ball rolling.