In the coffee shops of the eastern Sydney electorate of Wentworth, people have been talking about strategic voting.

The conversations go along these lines: “I am a Greens voter, but should I put independent Kerryn Phelps second ahead of the Labor’s Tim Murray to ensure the Liberals lose?”

Or: “I like Licia Heath, the independent and what she has done on schools, but I am usually a Labor voter, so maybe Murray second. Or would it be better to put Phelps second?”

Or: “I am a Liberal voter but I want to register a protest. Can I safely vote Phelps 1, then Liberal.”

Now it’s decision time.

In this highly educated electorate one thing is certain: voters are preparing to deliver a major rebuke to the Liberal party for dumping their former member Malcolm Turnbull as prime minister.

Turnbull held the seat with a 17% margin which he built up from his narrow 5.4% win in 2004, when the disgruntled former Liberal member, Peter King ran as an independent against him. But aside from that one nervous moment, Wentworth has been solidly Liberal since federation.

Weeks might have gone past since Turnbull flew overseas, but there is still deep-seated anger in Wentworth at the treatment of their beloved local member and the dysfunction in Canberra, as evidenced by questions at forums, polls and vox pops of voters.

But it’s also about what Turnbull stood for and where the Liberal party might be going. Among the Liberal voters of Wentworth, climate change, offshore detention of asylum seekers, and issues of tolerance, such as allowing schools to discriminate against gay students and teachers in the name of religious freedom, are big issues.

Australians are good-hearted people, led by a heartless government Kerryn Phelps

After all, four in five people in Wentworth were in favour of gay marriage in last year’s plebiscite, the second-highest vote in New South Wales based on percentage of voters.

Then there have been the sudden policy switches during the campaign such as Scott Morrison’s announcement that Australia was reviewing whether to relocate its embassy in Israel to Jerusalem.

It might have seemed like a winner in a seat where 12.5% of the population is Jewish, but if the forum at the Jewish Board of Deputies on Tuesday was any gauge, it was met with cynicism and dismissed by many as an ill-thought through, vote-buying move, even if they supported the idea of recognising Jerusalem as the capital.

This anger and concern on multiple fronts seems to have trumped the arguments that the Liberals’ candidate, Dave Sharma has been running: that the Liberals have been running the economy well; that they are the party of small business; that they have cut taxes and will keep taxes low and keep the nation secure.

Power prices, another strong theme of the Liberals, do matter in Wentworth. But Sharma has struggled to explain to his educated voters what measures have been put in place now the national energy guarantee has been junked.

Sharma was initially handicapped by being from outside the electorate, though perhaps this was less a factor than his reserved manner.

A foreign affairs bureaucrat, who served as ambassador to Israel at age 37, there is no doubt about his policy acumen and urbane manners. But diplomats are not used to trumpeting their own importance.

Sharma struggled to push himself forward and was often swamped by his high profile side kicks, such as former prime minister John Howard and assorted ministers.

Sharma also skipped a number of community forums, perhaps wisely, where he would have faced sustained questioning on climate change and refugee policy. But the small target strategy adopted in the early weeks of the campaign, when the Liberals thought they would win easily, arguably left him dangerously unformed in the eyes of an intensely interested electorate.

Instead, the Liberals have relied on multiple direct-mail pamphlets to introduce their candidate. Rival campaigns estimate the Liberals have spent $1m or more on their Wentworth campaign.

Wentworth byelection voter cards and Alex Turnbull. The son of former prime minister Malcolm Turnbull urges voters to kick out the Liberals in the poll, saying the party has been taken over by ‘extremists on the hard right’. Photograph: Facebook/AlexTurnbull

And all the time there was something missing: Malcolm Turnbull, who has failed to provide even a written endorsement for his successor.

Turnbull’s son, Alex Turnbull however had plenty to say: on Twitter, Facebook and in interviews. The underlying message was climate change was too important and people should vote against the Liberals.

In the last week the Liberals have unleashed a tsunami of advertising on social media to push Sharma to the top on Google searches, Facebook feeds, YouTube and other platforms. On Friday a fleet of motorbike Sharma billboards roamed the streets of Wentworth.

The question is whether this last minute push can persuade voters to stick with the Liberals when they enter the polling place.

The independent, well known local GP and marriage equality campaigner Kerryn Phelps, didn’t need to introduce herself to the electorate. But she got off to a shaky start after she flip-flopped on who she would preference: first Labor, then neither, then the Liberals.

In the last week she has been virtually inviting her supporters to ignore her how-to vote, saying they are smart enough to make up their own minds.

The leading candidates in the Wentworth byelection. Independent Kerryn Phelps, Labor’s Tim Murray, and the Liberal candidate Dave Sharma. Composite: Mick Tsikas, Carly Earl, Joel Carrett./AAP/The Guardian

As the campaign has progressed, Phelps has become more confident in her pitch: “the sensible centre”. She says she’s economically dry and won’t rock the boat on superannuation or tax, but she will push for action on climate change and getting people off Nauru.

“Australians are good-hearted people, led by a heartless government,” she said.

The Liberals have upped their campaign in recent days that a vote for an independent will cost them their majority in parliament leading to instability and chaos.

Phelps has responded: “The Liberals caused the chaos by dumping Turnbull.”

Earlier this week, Phelps was the target of a smear email which claimed she was pulling out of the race because she had been diagnosed with HIV. It called on people to switch their vote to Sharma.

A horrified Sharma deplored the gutter tactics – there is no suggestion any candidate campaign was behind it – but the incident, now referred to the federal police, appears to have only confirmed the distressing state of politics in voters’ minds.

Labor’s Tim Murray, a businessman and economist, who is president of Tamarama Surf Lifesaving club, has been polling surprisingly strongly.

He’s not the usual pick for Labor and he’s got the added advantage that he really is a local: born in Waverley, now living in Tamarama, albeit with a long stint living in China.

He’s been runing on Labor’s ability to actually legislate for climate change policy, but has been somewhat hampered by the party’s support for the Adani coal project in Queensland, which is hated in Wentworth.

Labor’s primary vote usually languishes in the teens in Wentworth, but polls have shown Murray at 21%. If Green voters follow the party’s how to vote advice – Greens leader Richard di Natale urged against it on Friday – Murray could overtake Phelps in the count.

If Phelps comes third, her preferences would decide the outcome and offer the Liberals the best shot at victory. Her how-to-vote puts the Liberals ahead of Labor – assuming people choose to follow it.

Otherwise, the Liberals will have only very limited preference flow from two or three right leaning minor parties.

The Greens’ Dominic Wy Kanak, the deputy mayor of Waverley, is also a well known local, though at times during the campaign it has seemed that he is deliberately keeping a lower profile. He is expected to get about 9% of the primary vote, which is down on other elections, probably due to the high profile independents.

The Greens candidate for the seat of Wentworth, Dominic Wy Kanak, has had a low profile campaign. Photograph: Dean Lewins/AAP

The surprise performer in the campaign has been Licia Heath, a local who has campaigned for more funding for public schools in the area, and who has the backing of Sydney’s independent lord mayor, Clover Moore.

Running on a platform of reforming the processes of government, such as donations laws, a federal ICAC and more women in parliament, she’s proved herself a strong communicator and offered a vision of what politics could and should be like. She is not directing preferences.

Then there is a wide field of minor parties and candidates, representing issue from ending the live sheep trade (the Animal Justice Party), to euthanasia ( the Euthanasia Party), to restricting immigration except for south African farmers (the Australian Liberty Alliance).

By Friday afternoon the candidates and third party campaigners were jostling for fence space at polling places to put up their final messages. One question is whether Phelps, as an independent, will have the supporters and the experience to run the final ground campaign and get her how-to-votes into enough people’s hands.

The Liberals were busy plastering schools and church halls with posters warning of impending chaos and a hung parliament. Late on Friday, there was some speculation that the government’s panicky predictions of a loss was really about managing a record swing and setting up the narrative of snatching victory from the jaws of defeat.

ABC elections analyst Antony Green is predicting an outcome on the night, despite the field of 16 candidates. He also predicted it would be close.

A hiccup might come if the second and third placed candidates are neck and neck. More than 11,000 people have applied for a postal vote and two weeks is allowed for their votes to arrive at the Australian Electoral Commission.

On the night the AEC will do an indicative preference count so as to produce a two-party preferred result. But it has to make a call ahead of time as to which two candidates it thinks will be first and second to do the calculations. If it gets it wrong, it will order a reset.

The seat may not be declared for days or even weeks.

• This story was amended on 22 October 2018 to correct the statement that Wentworth had the second-highest vote supporting marriage equality in Australia. It was the second highest in New South Wales.