I suggest a POD in the 1790's to do a good job of it. In the unlikely event of a Hawaiian King taking the tiger by the tail, manage trade similar in the way Japanese did two centuries earlier. Hire out trade groups to sell the items of sandalwood directly to the Chinese, to provide monetary exchange. Milk the sandalwood trade, and not for reasons so common with present day or past in OTL.
Do not allow whalers to dock. The two big STDs were already there. (Just after the first western contact Captain Cook was docking about 200 miles away only a few months afterwards, surrounded by desperate Hawaiian men having swollen (x) & wanting a cure.) But without any organization, matters would greatly weaken the government. Things traveled fast in this permissive atmosphere, to be sure, and matters would have to change, and fast. Control is the key thing. Find out how to prevent and act firmly.
In perfect hindsight, poor Portugese, Andes Indians, and Koreans are allowed in, to make up an eventual 10% of the gene pool. The three groups are unlikely to take over, and only men are allowed to immigrate, enfusing the islanders with critical biological boosts.
As recalled, in the 1790's, the Kingdom started getting its foundations by capturing a western ship with a cannon, to tip the ballance of power, eventually taking over all the islands circa 1820's with Kauai. Few westerners could be allowed in, certainly not the missionaries, which really were a fifth column for the monarchy and very necessary Hawaiian customs.
About Japan, if the state of Hawaii can not maintain balance of power as a middle martime entity border state, like Armenia did in Roman times, they would have tried to interfere if at all operating as in OTL. I will let other posters deal with this.