Will the Republican Party and President Trump attempt to use their midterm playbook in next year's elections? A major change at the Homeland Security Department this week makes it all but certain that immigration will once again get the most attention in the Democratic primaries, all of it aimed at the president and his get-tough policies. And upcoming confirmation fights in the Senate will force Republicans on Capitol Hill to either defend Trump or try to position themselves as internal critics in a party that hasn't tolerated them.

The catalyst for the showdown was the departure of Homeland Security Secretary Kirstjen Nielsen, whose tenure would be considered relatively brief in any other administration. Nielsen served in the position less than two years after her mentor and predecessor John Kelly gave up the job to become White House chief of staff. Nielsen endured public and private criticism from Trump during her term at DHS as border crossing attempts peaked. Nielsen worked hard to project unity with Trump on immigration enforcement, but it became apparent that Trump didn't think Nielsen had taken a tough enough approach to the job.

Nielsen wasn't the only homeland security figure looking for work this week. Trump also ordered the removal of Secret Service chief Randolph "Tex" Alles, a former Marine general also brought in by Kelly. Alles' departure might be related to an embarrassing failure by his agency at Mar-A-Lago, in which Chinese national Yujing Zhang penetrated security at the resort with what appears to be electronic spying devices. The arraignment inadvertently highlighted several security failures at the resort where Trump spends many weekends away from the White House, although Zhang's entry took place while Trump was elsewhere.

However, other terminations and rumored personnel moves look more related to Trump's dissatisfaction with immigration enforcement. Trump named Customs and Border Patrol chief Kevin McAleenan acting homeland security secretary after Nielsen's departure. That created its own controversy; since Trump had not filled the deputy secretary position yet, the next in command should have been Undersecretary for Management Claire Grady. NBC News reported that Grady could get fired to make room for McAleenan, even though that would then leave the top three homeland security positions without Senate-confirmed appointments in those slots. By late Monday, rumors also swirled that Trump would fire Citizenship and Immigration Services director Lee Francis Cissna after having pulled the nomination of Ronald Vitiello for director of Immigrations and Customs Enforcement.

The housecleaning at homeland security prompted a public warning from Sen. Chuck Grassley (R-Iowa) to Trump not to make any more changes. Grassley had worked closely with Cissna and got blindsided by rumors of his impending doom. "These are good servants," Grassley told reporters, adding that they have performed well in pursuit of Trump's goals. "They are the intellectual basis for what the president wants to accomplish on immigration."

But what exactly does Trump want to accomplish on immigration? This amount of turnover will be so disruptive that it will be difficult to accomplish anything in the short term except rearranging org charts and re-establishing lines of authority. It might take months before homeland security officials find their footing — and their offices — and begin work on Trump's goals for immigration, let alone make improvements on the performances of Nielsen and others. With election season approaching and record numbers at the border now, that's a significant gap in what Trump characterizes as an "emergency."

In that period of time, Trump will have to find replacements for these positions, all of which will require Senate approval. That will take at least several weeks if not months even after Trump makes the appointments. Recently, Trump has avoided those decisions by keeping "acting" secretaries in place indefinitely. McAleenan will be the third current acting secretary in Trump's Cabinet, along with the current acting secretaries at the Interior and Defense Departments. While Trump has said before that he likes the "flexibility" of temporary replacements, in practice that means that career officials are making most of the operational decisions — the so-called "deep state" that Trump vehemently accuses of short-circuiting his presidency.

Put simply, the exodus at homeland security is a recipe for chaos, and a gaping hole on the GOP's political flank. Democratic presidential contenders will have easy targets in the new nominees when Trump gets around to appointing replacements. Senate Democrats will have multiple opportunities to rip homeland security policies and actions in the confirmation hearings. Those may not be as contentious as the Brett Kavanaugh hearings, but they won't be collegial affairs, either.

Perhaps Trump wants chaos, however. Trump tried arguing that the nation had an emergency on the southern border in the midterms, only to have that message flop in suburban districts as Republicans lost the House. He stuck to that argument through a government shutdown and now into a legal fight over his National Emergencies Act declaration. By clearing out so many top officials at once in the homeland security department, Trump has exacerbated the emergency by adding administrative chaos — which he can argue was necessary in order to get officials in Washington to take it seriously.

That sets up a stark contrast with Democrats who insist there isn't any emergency at all, nor any need to build a wall to mitigate it. That worked in the midterms when the scope of the migrant rush to the border wasn't as clear as it is now. Will it work again with Trump at the top of the ticket? Democrats dismissed his immigration alarmism in 2016 and ended up getting burned. If they don't move at all in Trump's direction between now and November 2020, they might score big again as they did last year — or get caught with their pants down as they did in 2016.

Will Republicans in Congress unite behind Trump in this new strategy of top-down chaos? Grassley's reaction might be a warning sign, but Mitt Romney sent a surprising signal of solidarity with Trump on Sunday. The Utah senator and frequent Trump critic told NBC's Chuck Todd on Meet the Press that "the president has tapped into something which the people feel very deeply" on border security. "This is a winning issue, I think, for Republicans," Romney said, "but more importantly a winning issue for Americans to say, ‘We have to have sovereignty of our nation."

Republicans had better hope that's the case, and that Trump can shift the blame for chaos at homeland security to his Democratic critics. Creating an exodus at the top of the agency responsible for his signature issue with 19 months to go to re-election may well be the biggest gamble of Trump's first term.