For a man who is a near-certainty to become Sweden's prime minister after today's general election, Stefan Löfven has had a miserable campaign.

In his latest misstep, Löfven, a burly union leader, was accused last week of "shoving" the female enterprise minister and head of Sweden's Centre party, Annie Lööf, during a televised election debate. A Twitterstorm ensued and the political news the next morning was dominated by the fracas.

That unhappy episode came during the last of eight leader debates in which Löfven has consistently failed to shine. After eight years of centre-right rule, the Social Democrats are set to claim back power, but no one is pretending they have set the campaign trail alight.

Nicholas Aylott, a politics professor at Södertörn University, just outside Stockholm, believes Löfven, a former welder who has never been elected as an MP let alone served as a minister, has "done OK" on the campaign, given his party's "extremely cautious" election strategy.

He thinks the real problems will come when, as almost everyone expects, he is tasked with forming a new government this week. "It's really complicated and it's really uncertain," he says. "We haven't had a similar situation since 1991 … and the result was a large degree of chaos, which doesn't bode well."

A poll at the start of last week from Sweden's leading pollsters, Sifo, showed a late surge in support for the three main left-of-centre parties, giving them a six-point lead over the centre-right alliance that has ruled Sweden for eight years.

But at the makeshift row of election huts that has sprung up in the main square of Malmö, each a variant on a traditional Swedish summer cottage, it is the huts of the Green party and the new feminist party, Feminist Initiative, rather than their Social Democrat allies, that are doing most business.

Gustav Fridolin, 31, the Greens' clean-cut joint leader, puts this down to what he calls the "red-green wind" sweeping Sweden. "People are tired of the government … The common feeling is enough. Enough of privatisation, enough of big profit within the school system and within the health system."

The last four years have seen a string of scandals at privately run, state-funded care homes and kindergartens, the bankruptcy of one of Sweden's largest free school chains, and the plummeting performance of Sweden's students as ranked by the OECD's Pisa study, all of which have helped turn the country against the centre-right and its reforms.

An opinion survey by Gothenburg University's SOM Institute found last year that seven out of 10 Swedes believed the country's experiment with letting private companies profit from public welfare had been a mistake.

But the Social Democrats have singularly failed to benefit. Sifo's previous poll, at the start of September, put the party on only 27%, by far the lowest figure since Löfven took over as leader in January 2012. Repeated on Sunday, it would mark the party's worst election result since working men got the vote in 1909. At the Social Democrat headquarters in Malmö, Björn Gudmundsson, the first ombudsman, or chief organiser, for the city, smiles wryly at the mention of that poll. "When I educate local party members, I tell them that a good local election leader has to 'eat ice'," he says. "Take it cool. Don't react to everything that happens, or you lose your own compass."

For a party that located its postwar power base in Sweden's manufacturing heartlands and port cities such as Malmo, the post-industrial era has proved treacherous to navigate. Gudmundsson displays a table showing how since 1970 the party has had to rely first on the Left party for power, and then, from 1988, on the Greens, losing about a third of its vote over the period. It's a story repeated across the country.

Outside a vegan cafe off Möllevången square, a Malmö district of immigrants, students and creative types, Henry Bergström and Josefin Eigert, both 22, typify the new left-of-centre voters the party has failed to win over. "We were just talking about, 'do you vote for yourself, do you vote for your nation, or for the world?'," says Bergström, who is studying computer programming at the city's university. "So we discussed the effect of having a militant feminist party in the government. 'Did you know Sweden has a feminist party in government. Yes, pure feminist!' That would echo throughout at least Europe, probably the world."

Feminist Initiative is the big new draw for younger leftwing voters in Malmö. A few weeks ago it briefly rose above the 4% threshold needed to get into parliament in the polls.

The risk for the Social Democrats is that it slips below the threshold on the day, eliminating more than 3% of the left's votes, and all but ensuring a weak, minority coalition reliant on the anti-immigration Sweden Democrats to get anything through parliament.

"It's a very technical, difficult position for all these voters who want to support the feminist party but who very much dislike the Sweden Democrats," Ulf Bjereld, a politics professor at Gothenburg University, says. "Shall they vote with their heart and support the feminist party, and maybe the feminist party will win a place in the parliament, or will they help the Sweden Democrats to get this pivotal position?"

None of this worries Bergström. "That's so boring to think like that! To be tactical!" he says.

Eigert, who works at the local hospital, says: "No, just vote what you think is right, and see what happens."

Mariam Ismail Egal, an activist taking a rest at Social Democrat headquarters after a morning pounding the streets in one of the city's middle-class districts, dismisses Fi, with its populist feminist, anti-racist message, as little more than a vehicle to get its leader Gudrun Schyman back into parliament.

"I don't buy it," she says. "I'm black and I'm a very proud Social Democrat, because what we are trying to do isn't to fight only for the stigmatised groups. We see people for who they are, not for their colour, age or background."

She is more worried about the Sweden Democrats, who she says are making inroads into Malmö's immigrant vote by pitting immigrants of European origin and those who arrived in the 1960s against newer immigrants and those from African countries. "There are some immigrants who buy their bullshit, so we shouldn't underestimate their strength," she says.

Two of this month's polls showed the Sweden Democrats overtaking the Greens to become Sweden's third largest party. At the party's election cottage, which is guarded by a threatening Doberman with a collar saying "security dog", activists boast of how strong their position will be. "Whoever takes the lead, they will have to come to us to get their 50%," boasts Rickard Åhman-Persson, one of the local leaders.

"It looks as if the left-of-centre parties won't get a collective majority," Aylott agrees. "It will be a weak government, unable to implement anything terribly consequential and that's a really risky situation for the Social Democrats to find themselves in."

He believes that if the Sweden Democrats do indeed gain a pivotal position, that might justify one of the smaller centre-right parties crossing over and striking a deal with the new government.

He adds: "One of the other centre-right parties could make the claim that they're doing a deal with the left to try to save Sweden from the malign influence of the Sweden Democrats, taking responsibility in order to save Sweden from this ghastly scenario."

This is the most likely to be the Liberal party, but Löfven might also need the Centre party, the former farmers' party whose leader, Lööf, was still milking the previous night's mini-scandal. "I was scared he was going to get me in a jujitsu hold," Lööf told one interviewer

If he's going to get through the coming year, Löfven may need to eat a lot of ice.