Richard Trumka, president of the United Mine Workers of America, was arrested with four other UMW officials at the South African Embassy yesterday and announced that his union will escalate its opposition to South Africa's racial policies and seek to ban importation of the white-ruled nation's coal and coal products.

Trumka, a lawyer and former mine worker, said his union has filed a petition with the U.S. Customs Service in an effort to stop coal imports produced by "slave labor" and will join the World Council of Churches in urging consumer boycotts of corporations that invest in South Africa.

The petition to the Customs Service, according to a lawyer for the union, is based on a section of the U.S. Code that bans foreign goods and merchandise produced or manufactured by convict labor, forced labor and/or indentured labor under penal sanctions. Its enactment was designed to protect U.S. workers from unfair competition because of cheap labor markets abroad.

The union, which represents about 240,000 active and retired coal miners, has been hurt by increasing coal imports from South Africa, according to its petition.

The petition, which asks for a hearing and investigation of the matter, said UMW members suffer because South African coal is mined by low-wage workers under conditions of indentured labor. Black miners who remain in the "white areas" of South Africa without performing the work . . . "face possible fines, imprisonment and deportation to forced-labor camps," the petition said.

Trumka was charged with demonstrating within 500 feet of an embassy, a misdemeanor. Also arrested were Cecil Roberts, the union's international vice president; John Banovick, its international secretary/treasurer; and staff members Richard Barchiesi and Kurt Kobelt.