China very rarely has any impact on Taiwanese elections. This one was decided by a lacklustre KMT completely buggering up their last chance of success by failing to strike a deal with third-party candidate Ko Wen-Je on a coalition.
To put it into context, the current President (also DPP, same as Lai) was elected with 56% of votes cast on a 66% turnout, then re-elected with 57% on a 75% turnout. Lai in contrast barely scraped above 40% with a 72% turnout - in other words, he lost 17% of Tsai's voters to his opponents and has the second lowest vote share of any elected president in Taiwan's history.
His KMT opponent Hou You-Yi had a terrible campaign. He's an ex-policeman who was president of the Central Police University and is currently mayor of New Taipei City, the municipality surrounding Taipei itself and which has an extremely complicated urban/rural, fishing/agriculture/industry brief. His tenure has been sound but unspectacular but the trouble is, he's been incredibly forgettable throughout his campaign and all but disappeared from view after announcing his VP candidate. He took 33% of the vote this year, which in context was even worse than the last KMT candidate, Han Guo-Yu (who won Kaohsiung for the KMT - think Tories winning Liverpool on a platform of free copies of the Sun - then flopped miserably at the presidency), and his own municipality voted convincingly for Lai instead of their own mayor.
Ko Wen-Je was the dark horse and I personally was pleasantly surprised and extremely impressed by how well he did. He was a highly respected surgeon at National Taiwan University Hospital (the nation's premier teaching hospital) before standing successfully as an independent for Taipei City mayor. He was helped by the DPP withdrawing their candidate and as NTU is historically strongly associated with the Green camp (DPP-led) he was widely perceived as independent in name only, not least by the DPP. He pretty quickly disabused everyone and the extent of the vitriol aimed at him in this campaign shows just how upset they were. He gained 26% of the vote which given he's essentially a one-man party with limited representation outside of Taipei and who only entered politics seriously 8 years ago is amazing. His voters were typically under 35 and dissatisfied with the performance of the DPP after 8 years in office but unwilling to vote KMT. I personally believe he would have polled higher, but in Taiwan you can only vote in person at the polling station in your registered place of residence, and a lot of young people moving to the bigger cities for work may have found the loss of income involved in going home to vote unaffordable.
It's a historic moment, though. The first time a political party has had 3 consecutive terms in office, but as the DPP failed to gain a majority in the Legislative Yuan (Taiwan parliament, voting took place concurrently to the presidential election), Lai will struggle to achieve anything.