Two FBI employees who used to work for Special Counsel Robert Mueller have already been criticized by Republicans for texts they shared insulting President Donald Trump.

A review of their correspondence shows Mr. Trump wasn’t their only target: They held dim views of other prominent figures, from Chelsea Clinton to Obama administration Attorney General Eric Holder to their new boss, Attorney General Jeff Sessions.

The 300-plus texts, contained in 90 pages of Justice Department documents handed over to Congress late Tuesday, reveal a more complete portrait of Peter Strzok, a senior counterintelligence agent, and lawyer Lisa Page, dealing with the stresses of their jobs, handling politically sensitive investigations, and their extramarital relationship.

Mr. Strzok was the lead investigator into Democratic presidential nominee Hillary Clinton’s handling of classified information on her email server, and he later was spearheading the work of agents assigned to Mr. Mueller’s team. When Mr. Mueller learned of his text messages this summer, Mr. Strzok was reassigned to the bureau’s human-resources division. Ms. Page worked temporarily for Mr. Mueller but has been reassigned.

Related Video WSJ's Gerald F. Seib explains what have we learned after Special Counsel Robert Mueller unveiled his first two big actions in his investigation of Russian interference in the 2016 campaign. Photo: Getty

Neither Mr. Strzok or Ms. Page could be reached for comment, and a spokesman for Mr. Mueller has declined to comment on the matter.

Mr. Trump’s allies say that their critiques of Mr. Trump—they called the then-candidate “an idiot,” “douche” and “TERRIFYING”—call into question whether Mr. Mueller’s probe into Russia’s meddling in the 2016 presidential election can be free of bias.

At a congressional hearing Wednesday, Deputy Attorney General Rod Rosensteindefended the integrity of the Mr. Mueller’s investigation, saying it was free of any bias or taint.

Officials described the messages as having been flagged by the Justice Department’s inspector general as relevant to its investigation into how the Federal Bureau of Investigation handled its probe of Mrs. Clinton’s server.

Although many of their texts targeted Mr. Trump, others also drew their ire. Over the course of 16 months of correspondence, starting in August 2015 and ending on Dec. 1, 2016, that was culled from their work phones, Mr. Strzok said he loathed Congress and called presidential candidate Sen. Bernie Sanders (I., Vt.) an “idiot.” He suggested the death penalty was appropriate for Edward Snowden, a National Security Agency contractor who pilfered reams of sensitive information. He said Ms. Clinton, daughter of Bill and Mrs. Clinton, was “self-entitled.” And he described House Speaker Paul Ryan (R., Wis.) as “a jerky.”

He said, “I’m worried about what happens if HRC is elected,” apparently referring to Mrs. Clinton. He didn’t elaborate on his concerns.

Ms. Page described Mr. Sanders’s supporters as “idiots,” and said a Republican presidential candidate has “long been suspected of being gay.” She said that Senate Majority Leader Mitch McConnell (R., Ky.) looked like a “turtle.” They agreed a well-known reporter was “schlubby.”

Though Ms. Page expressed admiration for President Barack Obama, a Democrat, she and Mr. Strzok weren’t fans of the 44th president’s first attorney general, Mr. Holder.

Mr. Strzok texted one day that he had been sitting in front of a portrait of Attorney General Elliot Richardson, who resigned in 1973 rather than fire the special prosecutor during Watergate. His action is widely viewed in law-enforcement circles as a heroic act that helped lead to President Richard Nixon’s downfall.

“It’s next to the portrait of Eric Holder, which is wildly offensive,” Mr. Strzok wrote.

When Mr. Holder spoke at the Democratic National Convention, Mr. Strzok texted: “Oh God, Holder! Turn it off turn if off!!!”

When they learned that Sen. Jeff Sessions (R., Ala.) was going to be the next attorney general, Ms. Page wrote: “Good god.”

Other texts were more personal. When Mr. Strzok seemed down, Ms. Page sent him a note saying, “Maybe you’re meant to stay where you are because you’re meant to protect the country from that menace,” an apparent reference to Mr. Trump.

“I just know it will be tough at times,” he replied.

“I know it will too,” she wrote back. “But it’s just a job. It’s not a reflection of your worth or quality or smarts.”

When Ms. Page had lunch with an unidentified person, she texted Mr. Strzok: “We both hate everyone and everything.”

“I want to be there and hate with you,” Mr. Strzok replied, “or charm you back to happy. Looked for the two trump yard signs I saw on the way out to take a picture, but couldn’t see them.”

Newsletter Sign-up Capital Journal Scoops, analysis and insights driving Washington from the WSJ's D.C. bureau. PREVIEW

They seemed to stray into conversations about the investigation into Mrs. Clinton’s use of a private email server and the question of whether the Trump campaign colluded with Russia, which is the focus of Mr. Mueller’s probe. Mr. Trump denies any collusion, and Russia denies meddling.

On Aug. 11, 2016, just weeks after the FBI had opened its counterintelligence investigation into potential links between Russia and Mr. Trump’s campaign, Mr. Strzok wrote: “OMG I CANNOT BELIEVE WE ARE SERIOUSLY LOOKING AT THESE ALLEGATIONS AND THE PERVASIVE CONNECTIONS.” He added: “What the hell happened to our country?”

In one cryptic text, Mr. Strzok wrote: “I want to believe the path you threw out for consideration in Andy’s office—that there’s no way he gets elected—but I’m afraid we can’t take that risk. It’s like an insurance policy in the unlikely event you die before you’re 40…”

As the campaign wore on, they blamed Mr. Trump’s electoral appeal on “incredibly ignorant” people.

“I am worried about what Trump is encouraging in our behavior,” Mr. Strzok wrote. “The things that made me proud of our tolerance for dissent—what makes us different from Sunnis and Shias [blowing] each other up—is disappearing.”

The night of the election, they were both glued to the TV as Mr. Trump emerged the winner.

“OMG THIS IS…TERRIFYING,” Mr. Strzok wrote.

“Just woke up,” he texted Ms. Page the following morning. “We fought on and off all night…too hard to explain here. Election related. Which is also godawful bad.”

—Aruna Viswanatha contributed to this article.

Write to Del Quentin Wilber at del.wilber@wsj.com