This was a P0 national security issue, So China hyper-invested into alternative energy technologies, subsidizing and overproducing solar technologies at a loss, while investing in electric transportation and moving away from fossil fuels. It's paying off. Over the past 25 years, this strategy is proving to be very successful and by the end of this decade, the Malacca weakness will be overcome.
As a result, the rest of the world gets to enjoy cheap solar energy and cheap EVs.
Terawatt-hours per year is a ridiculous unit — it contains three different units of time embedded in it (seconds, hours, and years)
2700 TWh/yr = 309 GW
(Which happens to be about 37 W per person, or less than the average output of a 1 m² solar panel)