In the near pitch-dark, you can hear them before you see them — millions of cockroaches scuttling and fluttering across stacks of wooden boards as they devour food scraps by the tonne in a novel form of urban waste disposal.

The air is warm and humid — just as cockroaches like it — to ensure the colonies keep their health and voracious appetites.

Expanding Chinese cities are generating more food waste than they can accommodate in landfills and cockroaches could be a way to get rid of hills of food scraps, providing nutritious food for livestock when the bugs eventually die and, some say, cures for stomach illness and beauty treatments.

On the outskirts of Jinan, capital of eastern Shandong province, a billion cockroaches are being fed with 50 tons of kitchen waste a day — the equivalent in weight to seven adult elephants.

The waste arrives before daybreak at the plant run by Shandong Qiaobin Agricultural Technology Co, where it is fed through pipes to cockroaches in their cells.

Shandong Qiaobin plans to set up three more such plants next year, aiming to process a third of the kitchen waste produced by Jinan, home to about 7 million people.

A nationwide ban on using food waste as pig feed due to African swine fever outbreaks is also spurring the growth of the cockroach industry.

"Cockroaches are a bio-technological pathway for the converting and processing of kitchen waste," said Liu Yusheng, president of Shandong Insect Industry Association.

Cockroaches are also a good source of protein for pigs and other livestock. "It's like turning trash into resources," said Shandong Qiaobin chairwoman Li Hongyi.

"Essence of cockroach"

In a remote village in Sichuan, Li Bingcai, 47, has similar ideas.

Li, formerly a mobile phone vendor, has invested a million yuan ($146,300) in cockroaches, which he sells to pig farms and fisheries as feed and to drug companies as medicinal ingredients.

His farm now has 3.4 million cockroaches.

Li Bingcai shows cockroaches at his farm in a village in Changning county, Sichuan province, China, on Aug. 11, 2018. Credit: Thomas Suen/Reuters

"People think it's strange that I do this kind of business," Li said. "It has great economic value and my goal is to lead other villagers to prosperity if they follow my lead."

His village has two farms. Li's goal is to create 20.

Elsewhere in Sichuan, a company called Gooddoctor is rearing 6 billion cockroaches.

"The essence of cockroach is good for curing oral and peptic ulcers, skin wounds and even stomach cancer," said Wen Jianguo, manager of Gooddoctor's cockroach facility.

Researchers are also looking into using cockroach extract in beauty masks, diet pills and even hair-loss treatments.

At Gooddoctor, when cockroaches reach the end of their lifespan of about six months, they are blasted by steam, washed and dried, before being sent to a huge nutrient extraction tank.

A staff member walks among tanks that extract essence from cockroaches at a facility operated by pharmaceutical company Gooddoctor in Xichang, Sichuan province, China, on Aug. 10, 2018. Credit: Thomas Suen/Reuters

Asked about the chance of the cockroaches escaping, Wen said that would be worthy of a disaster movie but that he has taken precautions.

"We have a moat filled with water and fish," he said. "If the cockroaches escape, they will fall into the moat and the fish will eat them all."