Five people died last week when a hillside elevator plunged into a ravine at a resort on the Indonesian resort island of Bali. The victims were not international tourists, but young men and women who cleaned the property’s Instagrammable, hundreds-of-dollars-a-night pool villas.

As of Thursday, the Bali police were still investigating how the glass elevator’s cable snapped at the Ayuterra Resort on Sept. 1, killing the five workers, aged 19 to 24.

But this much is clear: The accident highlights the vulnerabilities of the labor force serving the foreign guests who see the island as a tropical paradise, and whose spending drives Indonesia’s tourism economy.

Many of the workers who power Bali’s hotels, resorts, restaurants, spas, yoga retreats and other tourism-dependent businesses grew up in villages around the island and attend vocational high schools that specialize in hospitality training. Some start their careers at 18 and typically earn less than $10 a day.

The wages in Bali, which has a population of more than four million people, can be higher than in other parts of Indonesia. But the island’s tourism industry is cyclical and vulnerable to external shocks, including the 2002 Bali bombing, the 2017 eruption of the Mount Agung volcano and the coronavirus pandemic.

The jobs can be risky, too. Some of Bali’s workers have full-time contracts that make them eligible for government employment insurance — a perk that includes pension benefits and a payout equivalent to 48 times a worker’s monthly salary if he or she dies on the job. Others, like four of the five young housekeepers who died in the elevator accident last week, are day laborers or contractors who work without a social safety net, sometimes for years.

Some of the Bali resorts that employ staff as long-term day laborers or contracts are large and prosperous enough to pay their foreign staff salaries of $5,000 or $6,000 a month, said Niluh Djelantik, an entrepreneur on the island.

“They think they can get away with it because nobody will find out,” she said.

In the Ayuterra Resort case, the government insurance agency decided to give all five workers insurance payouts of over $10,000. But such charity is rare. And even though the resort gave each of the victims’ families more than $2,600 each, mostly for funeral expenses, it reportedly did so only after requiring them to sign an agreement promising not to sue.

Representatives for Ayuterra Resort, in the Ubud area of Bali, did not immediately respond to requests for comment. The resort’s website advertises what it calls a “back to nature” guest experience that includes glass-lined bedrooms and views of a forest, a mountain and a river. On Thursday, the online rate for a two-bedroom Ayuterra penthouse villa with a private pool in October was nearly $700.

The glass elevator that malfunctioned last Friday was less a conventional elevator and more like a jungle tram or a funicular. Coconuts, a local news site, reported that the elevator’s track was more than 200 feet long, at an angle of approximately 40 degrees.

Footage of the accident showed the glass-enclosed elevator plummeting hundreds of feet down the track and crashing through part of the resort. Two of the five workers who were inside died at the scene, the police told local news media outlets. The others died in the hospital from their injuries, including head wounds.

The Ubud police chief, I Made Uder, told the local news media this week that the steel rope lifting the elevator had not been strong enough, and that its safety brake had not worked. But he added that police were still investigating the accident’s exact cause.

Jansen Avitus Panjaitan, a spokesman for the Bali police, declined to comment Thursday, saying that the investigation was still underway.

The victims — Sang Putu Bayu Adi Krisna, 19; Kadek Yanti Pradewi, 19; Ni Luh Superningsih, 20; I Wayan Aries Setiawan, 23; and Kadek Hardiyanti, 24 — were mostly from Ubud or nearby areas of Bali, according to local news media reports. One had been working for only two months.

After the accident, villagers on the predominantly Hindu island held ceremonies to cleanse the site where it occurred and release the spirits of those who died. Some of the victims’ friends also took up donations to help pay for cremation ceremonies.

Ms. Niluh, the entrepreneur, said some in Indonesia might consider the money that the victims’ families received to be a lot. But, she said, “you cannot replace a life with money.”