In a major scramble to prevent a leftist takeover in El Salvador, the Reagan administration has developed a three-pronged strategy that includes a push toward March 28 elections, rapid shipment of replacement arms to the Salvadoran military and massive U.S. training of Salvadoran Army recruits and young officers.

Senior officials here say they believe the battle for El Salvador is not lost, and even many critics of administration policy acknowledge that a more comprehensive strategy, especially with new emphasis on economic aid, now has been put together.

But it is hard to find any senior official here who is optimistic over the short-term prospects for gains in what is essentially viewed as a military stalemate where the ruling Salvadoran junta, at best, can hope only to contain the insurgency.

Their doubts range from whether the current strategy still is tilted too heavily toward a military solution rather than a negotiated political settlement, to the reliability and capability of the Salvadoran armed forces. There are also doubts about how much confidence should be placed in the intelligence on the local Salvadoran political and military situation that is reaching here and that is the basis on which decisions are made.

Although the comprehensive plan for the region now includes President Reagan's long-range economic program to try to deal with the poverty and economic ills that lie at the root of political turmoil in El Salvador and the region, U.S. strategy is focused more intensely on the next few months than on the coming years.

The goal, as Assistant Secretary of State Thomas O. Enders explained to Congress in recent testimony, is not military victory. Instead, officials say their aim is to keep the Salvadoran guerrillas off balance and the existing military-civilian junta in power long enough to give current and upcoming political and military developments a chance to unfold.

After 13 months of erratic policymaking that swung between veiled threats of military intervention and White House efforts to play down the crisis, "there is a much more pragmatic approach now," according to one official. "Nobody is trying to guess who is winning or to put a timetable on anything."

The current plan also includes support for covert actions to disrupt Cuban and Nicaraguan support activities for the Salvadoran guerrillas. The plan appears to have gained the approval, although not necessarily the confidence, of a number of U.S. civilian and military officials, some of whom last year criticized the initial vigor with which Secretary of State Alexander M. Haig Jr. addressed the Central American problem.

Haig's threats to "go to the source" of the problem, meaning direct moves against Cuba, "could have had us in a war," according to one senior military officer. Another officer described Haig's early strategy as entirely wrong.

The Joint Chiefs of Staff reportedly "dug in their heels" a year ago, opposing any policy that could have led to an actual confrontation with Cuba or the Soviet Union at that time.

Since then, these sources say, the United States has developed contingency plans for blockades of Nicaragua and Cuba, quarantine of oil shipments to Cuba and air and naval actions if necessary. The contingency planning is linked to possible "unacceptable military actions" in the region by Cuba, according to top officials. The definition of such "actions" is not clear, but one official said it could include any significant intervention in El Salvador by Cuban or Nicaraguan forces.

There is concern, for example, that the revolutionary Sandinista government in Nicaragua might take such a step if the rebel force in El Salvador appears to be losing. In this view, the Sandinistas link their own fate to a victory of the Salvadoran guerrillas on the theory that a revolution either marches forward or eventually gets turned upon itself. If the Salvadoran rebels lose, Nicaragua could feel threatened by rightist military forces in El Salvador, Guatemala and Honduras, according to this view.

There is, therefore, also a plan to build up the U.S. military posture in the Caribbean to demonstrate preparedness to move against Cuba or Nicaragua, possibly under the 1947 Rio Treaty, which provides for ensuring the political independence of countries in the region.

The possibility of a U.S. troop commitment in El Salvador appears to have no support in the upper levels of the administration, and officials say no one has proposed it in National Security Council meetings. Defense Secretary Caspar W. Weinberger has made clear that he opposes such an action unless there were public support for it. Last week, President Reagan said "there are no plans to send American combat troops into action anyplace in the world."

The problem faced by the administration, then, is how to prevent a guerrilla victory without the use of American forces and without damaging itself politically.

As the administration faces the crucial weeks leading up to the March 28 election, it is basing its actions on the following estimates of the situation in El Salvador:

Despite some successful, headline-grabbing raids recently by the guerrillas, U.S. intelligence says rebel strength is not yet sufficient to exhaust or defeat the forces of the U.S.-backed civilian-military government.

The size of the guerrilla forces is said to have grown only slightly in the past six months, to a maximum of 6,000, and some top experts here believe the rebels still do not have a big following among the frightened population of the small, war-torn country.

On the other hand, these same intelligence estimates say that the battlefield momentum in recent months has swung to the guerrillas, who now operate and communicate more skillfully over larger areas and who are expected to launch a nationwide series of attacks this month to try to disrupt and discredit the elections.

Most importantly, these estimates indicate that government forces lack the numbers, mobility, training and popular trust that they need to defeat the guerrillas. What continues, therefore, is a military stalemate.

Containing the increasingly experienced rebels, however, is an extremely expensive business that will require hundreds of millions of dollars annually in increased American economic and military aid, perhaps over many years, and that ultimately could fail after years of continued fighting.

It is also likely to require, in the view of some top officials, some increase in the number of U.S. military advisers in El Salvador beyond the 50 already there.

With that assessment in mind, the administration is concentrating its political energies on the March 28 elections for the Salvadoran constituent assembly. Officials hope the elections will provide at least a semblance of democracy, even though the leftists opposing the government are not taking part.

Critics of U.S. policy argue that elections under current conditions will be useless. They maintain that U.S. interests would be better served--and a stridently anti-American revolutionary government could best be avoided--if a quick negotiated settlement, involving forces of the left and right, could somehow be forged.

Elections will not end the war, they maintain. According to Rep. Stephen J. Solarz (D-N.Y.), "The longer the war continues, the greater the disintegration of the social and economic fabric of the country, and it is more likely that the government will collapse rather than the guerrillas. Then, American combat forces will be the only way" to prevent a guerrilla takeover.

Administration officials argue that the guerrillas should not be given at the negotiating table what they have been unable to win on the battlefield. While they acknowledge they have no real idea what will happen in the elections, they hold out the hope that the vote will result in a pluralistic government led by moderate Christian Democrats who form part of the current junta, and perhaps produce a coalition with moderates on the left.

Some officials, for example, believe there is less ideological cohesion within the five major guerrilla organizations now fighting the government than is sometimes suggested. They believe some of these groups eventually could be coaxed into participation in a new government.

On the other hand, an electoral victory by one of the five extreme-right parties challenging the Christian Democrats, or by a coalition of those forces, could eliminate any support El Salvador now has in Washington and throw the country into full-fledged civil war.

Whatever the outcome, the election has such potential importance, specialists argue, that it is too early to paint an unrelievedly gloomy picture in El Salvador despite the creeping gains of the insurgency.

It is widely believed here that the recent dramatic attacks by the guerrillas--especially the demolition of a vital bridge last fall and a January attack on the principal military airport in which half the government's Air Force was destroyed--were designed not only for military gains but also to score a public relations victory abroad and intimidate the public at home before the elections. Rebel strategy has been to weaken the economy and thus the government by burning buses and attacking construction projects. The idea, officials here say, is to discredit the election and deny legitimacy to the victor.

In this respect, officials here view these attacks as a tactical shift designed to produce a reaction against the junta in the United States similar to that caused by the stunning Communist Tet offensive in Vietnam in 1968.

To cope with this shift, the administration recently dispatched replacement helicopters and about 185 new trucks to El Salvador. Officials here hope the equipment will help give the Army at least some of the mobility it needs to keep the guerrillas off-balance during the coming weeks.

At the same time, officials hope that the continued flow of Salvadoran Army recruits and young officers back to their country after training at Fort Bragg and Fort Benning in the United States will gradually improve the Army and reduce the violence and indiscriminate killing of civilians caused by lack of discipline among untrained soldiers.

"Everybody agrees that reducing violence from the military is a major factor in the political strategy," says one official. The United States has already trained one 1,000-troop battalion in El Salvador. But this training was only sporadic because the troops and officers were called away continually for local skirmishes. Furthermore, there frequently are no officers with some Army units, a situation that also reduces discipline.

Now, another 1,000-troop battalion and about 500 cadet officers are being trained in this country. There are plans to bring another four or five battalions to the 14-week course here as the Salavdoran Army expands from about 16,000 to between 20,000 and 25,000 troops, including a doubling of the officer corps, according to Pentagon officials.

But questions still are raised about how effective U.S. advice and training will prove. Officials here note that the Salvadoran Army had been warned about sabotage and advised on how to protect the bridge and the airport, but declined to follow U.S. recommendations.

The officials also note continuing indications that Salvadoran troops are more interested in self-preservation than in combat confrontation.

At the same time, no U.S. training efforts are being made within the Salvadoran National Guard, a 6,000-troop force that deals with local security and allegedly is responsible for much of the killing of civilians that has been a major problem in winning Salvadoran and U.S. support for the armed forces. Aside from the 5,000 to 6,000 troops at the core of the guerrilla forces, which can choose the time and place where they will strike, there are also estimated to be two or three times that number of rebel sympathizers who actively help in various ways.

The guerrilla officers generally are more experienced and more motivated than their government counterparts, U.S. officials acknowledge. Mortars and grenade launchers are beginning to show up in guerrilla units in addition to automatic rifles, many of which are U.S. M16s lost in Vietnam and now shipped clandestinely into Central America.

American officials also say the guerrillas have a sanctuary in Nicaragua for a command and training center, operated by Nicaraguans, Cubans and Salvadoran insurgents, that controls the rebel network inside El Salvador. These officials say that the precise location of this command center has been identified by improved U.S. electronic intelligence.

The question of arms supply is central to the broader controversy surrounding administration policy toward the region. Secretary of State Haig, for example, has cited the flow of arms from the Soviet Union and Cuba into Central America, especially into Nicaragua, in threatening Cuba and invoking a tough policy toward both Havana and Moscow. By extention, he has also invoked the clandestine flow of arms from Nicaragua into El Salvador to support this stance. The Nicaraguans have denied this assertion and challenged the administration to provide evidence.

There is little doubt that Soviet shipments of arms to Cuba have increased sharply in the past several months and also little doubt about stepped-up shipments to the Sandinista government in Nicaragua, although their Soviet-built tanks actually came from Algeria. Last week, Assistant Secretary of State Enders also alleged that the arms flow into El Salvador is now the highest ever, even beyond the levels of a year ago, just before the guerrillas launched their unsuccessful, so-called "final offensive" to topple the junta.

The State Department, however, has been unwilling to supply new data on the alleged arms flow, and many officials in several agencies say privately that while there have been some recent increases, there has not been a sustained surge in arms. The increases are designed to support the expected pre-election offensive, but officials say some guerrilla units still do not seem to have enough arms and ammunition to carry out an offensive.

Some officials say the guerrillas do not need vast quantities of arms because they prefer hit-and-run attacks to direct confrontations with the Army.

Officials here say it is becoming harder to pinpoint where specific arms shipments to El Salvador are coming from. They say considerable progress has been achieved in shutting off the overland arms flow via Honduras, but add that most arms now are smuggled into El Salvador in small planes that drop equipment by parachute and in small boats that cross the Gulf of Fonseca. The Salvadorans have four patrol boats, but at best one is seaworthy at a time.

While all officials agree that the secret arms supply eventually needs to be shut off, interviews suggest that this is not as important an issue in private as it is in public. In fact, one official warned that too much talk about failing to stop the arms flow gets translated into the idea that the government is losing the war. That idea, he added, is untrue.

In these interviews, officials tended to put much more emphasis on the need to improve the performance and reduce the violence of government forces and provide the political support and economic assistance for the vital land reform program that would keep relative centrists such as Salvadoran President Jose Napoleon Duarte, a Christian Democrat, on course.

"Ultimately, what will determine what happens down there," said one senior official, "is whether the kid walking down the road from the village tells the Army that the guerrillas are there or warns the guerrillas that the Army is coming."