After Arlene Foster became the first woman and the youngest person to lead Northern Ireland and the Democratic Unionist party in 2015, she became the subject of a gentle lampoon: Arlene Foster Holding Things.

A Tumblr site collated press photographs of the first minister holding a basket of fruit, a helmet, a T-shirt, a gilet, a clapper board, a medical device, a trophy, a car wheel, a spade, a brochure, potatoes, thread, scampi, scissors, on and on, an endless, eclectic array of photo-ops.

It was a harmless running joke about a leader who had broken through Northern Ireland’s patriarchy and liked to be photographed.

Four eventful years later, few people are laughing at the punchline: Foster holding the key to Brexit.

Boris Johnson has contorted his Brexit plan to satisfy the DUP and, by extension, hardline Brexiters in the Conservative party, with consequences that could last generations.

If the prime minister’s proposal dies in Dublin and Brussels, triggering a constitutional crisis, a no-deal exit or toxic election, or perhaps all three, there will be a “blood red” trickle leading to Foster.

“There cannot be a border down the Irish Sea, a differential between Northern Ireland and the rest of the UK,” she declared last year. “The red line is blood red.”

The blood turns out to be diluted with ketchup because the DUP this week accepted Johnson’s plan that Northern Ireland stays in the EU’s single market for goods while the whole of the UK leaves the EU’s customs territory.

The plan may win Westminster support but has received a frosty response in Brussels and Dublin because it would require customs checks on the island of Ireland – a hard border – and grant a veto to the Stormont assembly.

Whatever happens next, this much is clear: Arlene Foster’s words will be closely studied, from Watford to Warsaw. “She is one of the most important politicians in Europe at the moment,” said Jon Tonge, a University of Liverpool academic and co-author of a book about the DUP.

The paradox is that Foster, 49, has never been weaker.

She is isolated within her party, which reportedly wants to dump her. The DUP itself is isolated. Most Northern Ireland voters oppose Brexit. Farmers and business executives fear no deal, or the Downing Street plan for a double border, would decimate trade. The DUP’s unionist rivals cry betrayal at the prospect of divergence from the rest of the UK.

Yet Foster, dented, chipped and demonised, is unbowed and in a position to shape history.

“There’s resilience there,” said Peter Weir, a party colleague and former education minister who has known her since they were law students. “It’s perhaps unsurprising given what she’s come through in her life.”

Foster was born in 1970, a year after the Troubles erupted, and grew up near the border in rural County Fermanagh where Protestants felt besieged by IRA attacks.

She was eight years old when her father, a farmer and part-time police officer, was shot outside the family home. “My father came in on all fours crawling, with blood coming from his head,” she once told the Belfast Telegraph. He survived.

A decade later the IRA blew up her school bus in an attempt to kill the driver, a part-time soldier. The girl seated beside Foster was seriously injured. “Those experiences shaped and soured her to an extent, which is inevitable,” said Tonge.

Foster became a solicitor and joined the Ulster Unionist party (UUP) but opposed the leadership’s endorsement of the 1998 Good Friday agreement, deeming it soft on the IRA. In 2004, an elected assembly member, she defected to the harder-line DUP.

When Ian Paisley led the party into government with Sinn Féin in 2007 Foster, married with three children, swiftly rose through the ranks, serving as minister for the environment, then enterprise, then finance before taking over from Peter Robinson as party leader and first minister in 2015.

Young, female, Church of Ireland rather than Free Presbyterian, a fan of EastEnders and Strictly Come Dancing, by DUP standards Foster seemed modern and cuddly. “She’s a very warm individual – very down to earth with the public. She has a good heart,” said Weir.

Friends say she is socially pragmatic and no homophobe, but Foster has played to her party’s base by opposing marriage equality and abortion liberalisation.

The bigger surprise, say critics, was incompetence and clumsiness.

Under Foster’s watch, a botched renewable heat incentive (RHI) scheme allowed farmers and DUP cronies to claim subsidies for heating empty barns, an arcane-sounding scandal that span out of control and spawned a public inquiry that exposed deep dysfunction in Stormont.

“The cash-for-ash scandal has exposed Foster’s judgment in multiple areas,” said Sam McBride, a journalist and author of a forthcoming book, Burned, which details Foster’s central role in the saga.

It quotes one senior public servant who accuses her of obsessing over PR photos and neglecting strategy.

McBride said: “Foster can be disarmingly and effectively direct … but she also has a fierce temper and hates admitting mistakes to the point where it undermines her as a leader.” The pending RHI inquiry report is expected to lay this bare.

Foster’s stubbornness contributed to Sinn Féin quitting Stormont in 2017, collapsing power sharing and creating a vacuum just as Northern Ireland confronted existential questions. Polarisation deepened when Foster compared Sinn Féin’s demand for an Irish language act to an insatiable crocodile, a gaffe that emboldened calls for a united Ireland.

Northern Ireland will soon pass a thousand days without government, a milestone that undermines the credibility of a Brexit plan that would give the zombified Stormont a veto over trading arrangements.

“She’s tenacious but lacks political dexterity,” said Tonge. “In terms of advancing political stability in Northern Ireland, the Foster years have been a failure.”

It is hardly all Foster’s fault. Sinn Féin won’t return to Stormont. Civil service machinery is wonky. The DUP’s 10 Westminster MPs, led by Nigel Dodds, decide Brexit tactics. The Conservative party is melting and the Irish government won’t soften the backstop.

But as Northern Ireland swerves from fiasco to fiasco, putting its economy, stability and very existence in doubt, it is Arlene Foster holding the reins.