“We will come out stronger and believe me, we will be bigger, better, stronger than ever before,” Mr. Trump said on Monday during a White House news conference.

George W. Bush never recovered from his flyover of Hurricane Katrina’s devastation. Barack Obama got a bipartisan boost late in his re-election campaign for his handling of Superstorm Sandy.

Now, President Donald Trump confronts the political risks and potential gains that come with leading the federal government’s response to a deadly and destructive natural disaster. Hurricane Harvey, the massive storm that has dumped torrents of rain across Texas flooding Houston and other cities is the first major natural disaster of Trump’s presidency, and the yet-to-be-determined scope of the damage appears likely to require a years-long federal project.

Mr. Trump, who is suffering through a long stretch of low approval ratings, has been particularly eager to seize the moment. He will visit Texas on Tuesday and may return to the region again on Saturday. The White House announced the first visit even before Harvey made landfall. On Monday, Mr. Trump promised Texans will “have what you need” and that federal funding would come “fast.”

“We will come out stronger and believe me, we will be bigger, better, stronger than ever before,” Mr. Trump said on Monday during a White House news conference.

The President’s unconventional style has still oozed out. Mr. Trump sent about two dozen tweets about the storm since Friday, marveling at the size of the hurricane and cheering on emergency responders- “You are doing a great job the world is watching!”

Indeed, he argued on Monday he specifically timed his controversial pardon of former Arizona Sheriff Joe Arpaio to capitalize on all the viewers tuned into storm coverage. The Friday night pardon wasn’t an attempt to hide the news, he said- “I assumed the ratings would be higher.”

Mr. Trump advisers are well-aware that the hurricane poses a significant test for the White House, which has largely been mired in crises of its own making during Mr. Trump’s first seven months in office, including the President’s widely criticised response to white supremacist protests in Charlottesville, Virginia. Mr. Trump, who ran a real estate business and starred in a reality show before taking office, has no experience in the kinds of recovery efforts that will be required in Texas and has struggled at times to show competency in governing.

Administrations often tread carefully in planning visits to disaster-ravaged areas. Mobilizing a President, his staff and his security is an enormous logistical undertaking and can pull local law enforcement resources away from the disaster recovery efforts. But Mr. Trump hasn’t been cowed.

Aides said it was Mr. Trump who pushed for the White House to make his desire to travel to Texas known early. He won’t be visiting Houston, where flooding has wreaked havoc on the nation’s fourth-largest city. Instead, he is meeting with local leadership and relief organizations in Corpus Christi, then visiting the state’s emergency operations center in Austin.

“Conditions haven’t cleared in Houston yet so probably not appropriate for him to go up there, probably not safe for him to go up there,” said Rep. Blake Farenthold, R—Texas. “But I do think having your own eyes on the devastation that I have seen is important.”

The optics of a President’s initial response to a natural disaster can be long-lasting.

Mr. Bush was haunted by his now-infamous declaration that then—FEMA Director Michael Brown was doing “a heckuva job” a statement that appeared wildly off base after the full scope of the devastation became clear. Images of Mr. Bush peering down at the flooding in New Orleans from Air Force One also furthered the impression that he was detached from the horrific conditions on the ground.

“He understands why that picture became a metaphor,” said Dana Perino, who was serving as deputy White House spokeswoman at the time.

Mr. Trump has played storm politics before. During his campaign, he rushed to Louisiana, in his signature “Make America Great Again” hat, to view damage from massive flooding. Mr. Trump made it to the battered neighborhoods before Democratic rival Hillary Clinton and while President Barack Obama was vacationing.

“We’re glad you’re not playing golf at Martha’s Vineyard,” one woman told him, a jab at Mr. Obama.

“Somebody is, somebody is that shouldn’t be,” Mr. Trump replied.

Over the weekend, Mr. Trump offered a sunny assessment of the response efforts while the rain was still pouring down on Houston and other Texas towns. He cited the “great coordination between agencies at all levels of government” and declared, “We have an all-out effort going, and going well!”

Texas Gov. Greg Abbott, a Republican, has so far praised the federal response to Hurricane Harvey, which has been blamed for at least three confirmed deaths. But with nearly 2 more feet of rain expected, authorities worried whether the worst was yet to come.

On its own, a successful federal response to Hurricane Harvey is unlikely to reshape Trump’s presidency. But with his approval rating perilously low, it could help Mr. Trump convince some Americans that he has the capability to lead the nation through difficult moments.

Mr. Trump’s predecessors have also benefited from the political opportunities that can arise after natural disasters.

When Superstorm Sandy barreled across the East Coast days before the 2012 election, Mr. Obama paused his campaign to monitor the federal response from Washington. He traveled to hard-hit New Jersey, where Republican Gov. Chris Christie, a strong supporter of the President’s rival, lavished praise on Mr. Obama.

Obama advisers said at the time that while they didn’t believe the President’s Sandy efforts were a deciding factor in the election, the praise he received from Republicans was helpful in the midst of a highly partisan campaign.