The finely woven domestic harmony of the Ivory Coast, one of black Africa's best examples of successful economic development, has been badly frayed in recent weeks by a two-week high school teachers' strike that, aside from economic issues, brought to the surface simmering grievances and a clandestine opposition.

At the basis of the confrontation between President Felix Houphouet-Boigny and 4,000 high school teachers are deep budget cuts the government has made in their perquisites as the country faces a lingering recession-induced drop in prices for its crop exports.

The Ivory Coast is not alone in Africa in being badly hurt by plunging commodity prices and there have been similar government-civil servant confrontations recently in other countries, such as Nigeria, Sierra Leone, Liberia and Kenya. The governments now are encountering angry complaints--publicly muted when economic circumstances were better--about corruption by the political elite and a rise in militant opposition.

The Ivorian high school teachers struck from April 18 until May 3 over the government's 80 percent cut in their high housing allowances. The teachers accused Houphouet-Boigny of making them "sacrificial lambs" while not punishing his Cabinet-level appointees who, they charged, have embezzled and defrauded the government of hundreds of thousands of dollars and mismanaged the economy.

The government closed the nation's secondary schools and sent home 200,000 high school students, as well as 4,000 foreign teachers who were not involved in the strike.

Since his country's independence from France in 1960, Houphouet-Boigny has called education "the priority of priorities" and in recent years has devoted as much as 40 percent of the budget to education. Teachers' beginning salaries are $650 monthly, compared with an average starting salary for doctors of $277.

But in the second week of the strike, Houphouet-Boigny charged that the teachers' action was part of a political "destabilization" plot financed by an external power that he strongly hinted was Libya. He said he will be discussing foreign threats to the Ivory Coast's stability with President Reagan in a June visit to Washington and said he has appointed a commission to investigate the embezzlement allegations.

During the first week of the strike, Houphouet-Boigny also reported the vicious rape and beating of a teen-aged member of his family who was abducted from her school by men wearing police uniforms. He said there were telephoned death threats to the girl's mother, her aunt and Houphouet-Boigny's wife plus a written threat to bomb the Ivory Coast's new capital, the president's home village of Yamoussoukro.

An Ivorian source said it was felt these attacks and threats were by persons who wanted to take advantage of the unrest the strike caused. "No one believes the teachers were connected" to the attacks, he said.

Houphouet-Boigny also surprised his country by discussing his personal wealth, a substantial portion of which he keeps in Swiss banks as, he said, any prudent rich man would. Houphouet-Boigny was a wealthy coffee plantation owner before independence.

"I will not hide from you the fact that I'm very much pained and even disgusted" by the strike and the teachers' charges, Houphouet-Boigny said in a televised speech.

A European diplomat said the strike was linked to a month-long strike by University of Abidjan professors and students last year over issues of free speech on campus. At that time, Ivorian police kept a young Ivorian lecturer, Laurent Gbagbo, from delivering a speech on democracy and the need for a multiparty system. The Ivory Coast is a de facto one-party state.

Gbagbo now lives in France but he has become a symbol of the desire of a younger generation of Ivorians to liberalize the tight, paternalistic system that Houphouet-Boigny runs through his Democratic Party of the Ivory Coast, said the diplomat.

"Gbagbo's ideas of democracy have influenced a small number of young, idealistic teachers who want to open up the Ivory Coast's political system," he said. "The bad state of the economy, the budget cutbacks gave them the opportunity to galvanize all the teachers around the housing subsidy issue."

The diplomat and two well-informed Ivorians also said that a generational division has developed within the Democratic Party that reflects the broader division the strike brought into view. Under the present political system, said one Ivorian, there is "general anxiety" because Houphouet-Boigny, 77, has not designated a successor.

The ruling party is far from moribund, however. Houphouet-Boigny was able to muster a public rally of support for himself attended by tens of thousands of Ivorians of all ages when he issued a presidential decree ordering strikers back to work, under penalty of being fired, jailed and heavily fined.

Houphouet-Boigny coupled this with the firing of two unpopular education ministers in an apparent concilatory offer to the teachers. Under the threats of punitive action, the teachers ended their strike.

In the speech threatening the tough measures, Houphouet-Boigny continued to characterize the leadership of the teachers as agents of a foreign power, but he offered no evidence.