AKSU, China—Western companies, including brand name apparel makers and food companies, have become entangled in China’s campaign to forcibly assimilate its Muslim population.

Adidas AG, Hennes & Mauritz AB, Kraft Heinz Co., Coca-Cola Co. and Gap Inc. are among those at the end of the long, often opaque supply chains that travel through China’s northwest region of Xinjiang. Residents there are routinely forced into training programs that feed workers to area factories, according to locals, official notices and state media.

Political indoctrination is a significant component of the programs, which are aimed at ethnic Uighurs and other Muslim minorities, according to official notices. Along with vocational skills, the curriculum covers Mandarin Chinese, the importance of the Communist Party and national unity, Chinese law and how to counter extremism—such as not dressing too conservatively or praying too frequently. The programs can include militarylike drills.

For workers and factory bosses, resistance to such programs could result in detention as suspected extremist sympathizers.

Some companies said such compulsory training programs would contravene their policies for suppliers, which mandate responsible workplace conditions, free of discrimination.