Federal prosecutors have accused Donald J. Trump of plotting to subvert American democracy and mishandling nuclear secrets. But with those cases in limbo, state prosecutors in Manhattan are gearing up as though they will be the first to try the former president on criminal charges — for covering up a potential sex scandal.

The Manhattan district attorney’s office has begun to approach witnesses to prepare them for trial, including Michael D. Cohen, Mr. Trump’s former fixer, according to people with knowledge of the matter. He and at least two others involved in buying a porn star’s silence about her story of a tryst with Mr. Trump are expected to meet with prosecutors in the coming weeks.

With the potential trial drawing near, the district attorney, Alvin L. Bragg, has also added one of his most experienced trial lawyers to the team assigned to prosecute Mr. Trump.

And in recent public appearances, Mr. Bragg has presented the loftiest possible conception of the case, casting it as a clear-cut instance of election interference, in which a candidate defrauded the American people to win the White House in 2016. Mr. Trump did so, the district attorney argues, by concealing an illegal payoff to the porn star, thus hiding damaging information from voters just days before they headed to the polls.