The scene at the Miami airport brought to life the recurring nightmare of international travelers: several jumbo jets had arrived simultaneously, more were landing and hundreds of passengers were backed up waiting to be processed by about 10 harried immigration officers. The inspectors were processing 600 people an hour; the planes were disgorging four times that number.

People were pushing. People were fainting. "They were just stacked like timber in the facility," said airport director Dick Judy. Before the afternoon of chaos ended, two elderly women suffered heart attacks, police had been called in to control the rowdy crowd, and immigration inspectors staged a brief walkout after threatening that no one would be processed unless everyone remained calm.

Such scenes are hardly an everyday occurrence, even in Miami, home of the nation's fastest-growing international airport. But the havoc there last Feb. 28 offered a vivd reminder of the perennial problem facing those responsible for watching America's borders: how to guard against smugglers and keep out criminals without subjecting ordinary travelers to exasperating delays.

The problem could become more acute if Congress accepts President Reagan's proposed cutbacks in the two principal border inspection agencies, the U.S. Customs Service, which guards against the entry of illegal goods, and the Immigration and Naturalization Service, which guards against the illegal entry of people.

Current proposals would eliminate 161 customs inspection jobs, or about 3 percent of that workforce, while INS faces a 7 percent reduction in its inspection workforce -- about 100 of 1,453 inspectors.

These proposed reductions come after the number of international arrivals took the biggest jump in 20 years last year, with forigners taking advantage of a weakened dollar to visit America when the cost was relatively cheap. Some 32 million international passengers arrived at U.S. airports in 1980, up from 27.9 million in 1979, according to the INS.

"Obviously, the vast majority of people are nothing more than innocent travelers and we are attempting to do nothing more than welcome them," said Jim Purser, a program analyst in the Customs Service's Passenger Processing Division. "But it is a basic irreducible requirement that there be some kind of face-to-face interview."

At Dulles Airport, where customs inspectors check the passports of U.S. citizens as well, airline representatives like Pan American's Glenn Tally praise the smooth inspection work. Nationwide, the average interview with a customs agent took 78 seconds last summer, and the average interview with an immigration agent took about a minute, according to a Customs Service survey.

But often the averages don't tell the full story. Processing can move smoothly all morning at East Coast airports, only to jam up in the afternoon when flights from Europe start arriving.

"It's not uncommon to wait three hours, said Jim Gorson, director of facilitation for the Air Transport Association, the airline industry trade group, which is lobbying for streamlined inspection procedures. "If we harass vistors to the United States, they'll go someplace else."

One of the ATA's proposals is to increase the number of airports where preclearance can take place. Preclearance, which means processing passengers at the flight gate before they board a U.S.-bound plane, is currently done at six Canadian airports, Freeport and Nassau in the Bahamas and in Bermuda. The ATA would like to add airports in Shannon, Ireland; Frankfurt, West Germany: Tokyo and Mexico City to the list.

The inspection agencies have varying reactions. While preclearance is good in theory, said Purser, it costs Customs $1,200 a month in overhead to maintain one U.S. inspector abroad. Working in a foreign airport also can hamper Customs agents' ability to enforce the law, since they can only seize goods if the host government grants them the right, Purser said.

But inspectors for the INS, the U.S. Department of Agriculture (which tries to prevent introduction of such pests as the Mediterranean fruit fly) and the Public Health Service, have reasons to prefer preclearance, since they can bar entry of people or goods without worrying about deportation costs.

Another solution, one which will go into effect on a trial basis in Miami and Los Angeles next month, is the so-called "one-stop" clearance. For this procedure, INS agents are trained for Customs inspection and vice versa.

This system, tried and abandoned a dozen years ago because thoroughness was sacrificed to speed, was recommended again in a 1979 General Accounting Office report. "The one-stop procedure will be more effective if inspection policies are changed to that the passengers undergo primary inspections before they claim their baggage and hand baggage is inspected on a selective basis," the GAO said.

Sidney Reyes of the Customs Service said recently that the preclearance procedures have been much improved by the addition of computer terminals which can be used to check a passanger's name against government files.In addition, he said, in recent years the so-called "eyeball technique" of identifying potential smugglers or others trying to evade the law has become much more sophisticated