Osteen will interview the rapper-turned-evangelist Sunday at his 17,000-seat megachurch...

Ed Cox speaking in front of the Manhattan Federal Court in 2018.

His father-in-law was President Nixon and his boss is President Trump, so Ed Cox knows a thing or two about the Oval Office occupant trying to survive impeachment.

Cox predicts a very different outcome this time around.

Trump “is going to fight right through,“ the former longtime New York state GOP boss and current national coordinator of the Trump Victory fund told The Post.

Cox married Tricia Nixon — they met as teenagers at a Manhattan prep-school dance — in the White House rose garden in June 1971, and had a front-row seat to Richard Nixon’s fall.

He was a surrogate on the president’s 1972 re-election campaign when the Watergate scandal erupted — exposing the campaign’s spying on the Democratic challenger, Nixon covering it up, and leading to very public hearings that prompted the 37th president to resign in August 1974 before he could be impeached.

“It was much worse then — there were no defenders back then,” Cox recalled of his father-in-law’s impeachment battle.

“There was no back and forth then — he didn’t see it coming. Why should he have? It didn’t happen to Eisenhower. It didn’t happen to FDR. He was never prepared for thinking that impeachment would be used as a political weapon as it was back then,” Cox said.

The “Greek tragedy,” as Nixon once described it, also unfolded at the worst possible time, sealing his fate, Cox suggested.

It happened “in the middle of the worst recession since the Great Depression … and it hit bottom right around August of ’74,” said Cox.

Trump, conversely, faces his accusers while Wall Street is experiencing record highs, and interest rates and unemployment are low.

The political math is also different: Trump has a Republican-controlled Senate that would have to vote to convict or acquit, whereas Nixon “was the only president since at least World War II who … didn’t come in with at least one house on his side,” Cox said.

And counter-puncher Trump is indefatiguable, the veteran political boss added.

“President Trump understood he was in a different position — he’s going to fight. He’s got the resources — the media resources, the Twitter account, the 31 Democrats who are in Trump districts,” said Cox.

“When he gives those speeches, he’s holding onto his base,” he said. “He’s a realist who wants to win. ”

Cox even drew parallels between the two whistleblowers, then and now.

“I’m not a conspiracy theorist, but the deep state is there, and it’s palpable. It’s still there.

“Who was Deep Throat? A deputy director of the FBI [Mark Felt] … They used him as this mysterious guy who knew everything,” Cox said. “He didn’t know a damn thing.”

Some 46 years on, “the [Trump] whistleblower serves the same purpose,” Cox said.

Cox sees parallels in Trump and Nixon.

“What I recognized in [Trump] from the start was that the same fire that burns in him burned in my father-in-law — political fires,” said Cox, speaking in the library of his Upper East Side apartment, where Nixon often sat with such leaders as Henry Kissinger, British PM Ted Heath and the Rev. Billy Graham for informal chats after leaving the presidency.

“Completely different people, [yet] they both came up from tough backgrounds. They’re both anti-elitists.”

Trump is “a unique president,” said Cox, who also worked for Presidents Reagan and George HW Bush. In fact, Cox’s in-laws recognized Trump’s political promise early on.

The bombastic businessman was making the rounds of talk shows in 1987, hinting at presidential ambitions, when former First Lady Pat Nixon spotted him on The Phil Donahue Show. She told her husband about it and Nixon soon wrote Trump a letter, which encouraged, “whenever you decide to run for office, you will be a winner.”

Today that framed missive hangs in the White House.

Cox said there was a great mutual fondness between the two men. Nixon, who died in 1994, “spoke with respect for Donald Trump.”

Trump considered running for governor in 2014, Cox recalled, but was at odds with the tedium that deviated from a presidential election. Trump’s then-advisor Roger Stone urged Trump to go bigger.

“That run never made sense — Roger was right,” Cox said.

On Friday, Stone was convicted in federal court of seven counts of obstruction, witness tampering and making false statements to Congress in connection with former Special Counsel Robert Mueller’s Russia investigation.

Cox not only believes Trump will win his impeachment battle, but secure re-election in a “small landslide.”

Asked what advice his father-in-law would have given Trump today, Cox said: “For the good of the country, fight it and you will win.”