Smithfield Foods Inc. is one company that knows how to keep its piggy bank full.

The largest East Coast meatpacking plant -- one of the nine largest in the country -- does it by going after financially troubled pork companies, trimming their fat and then beefing them up to profitability.

Four years ago, Smithfield doubled its size and broke into the Fortune 500 by gobbling up its chief rival, Gwaltney of Smithfield, then owned by ITT Continental Baking Co. and located about 400 feet away from the Smithfield plant. About the same time, it roped in what it describes as the world's largest hot-dog plant, in Portsmouth, Va., which can spew out 16.8 million frankfurters a week.

Last year, Smithfield, which has corporate offices in Arlington, moved firmly into the national market by acquiring a struggling 95-year-old Milwaukee pork firm that had been losing between $2 million and $3 million a year.

And last month, in a surprise move, Smithfield announced its plans to buy Esskay meatpacking company -- a beleaguered Baltimore plant that had not been bringing home the bacon for years -- for $3.5 million.

"We have a history of being able to buy troubled meatpackers and to streamline the operations and turn them around and make them profitable," said Joseph W. Luter III, 46, the company's soft-spoken president and chief executive. "I think we'll be able to do that with Esskay."

Esskay, the area's second-largest pork packer, has been plagued with problems ranging from poor management to an antiquated factory built in the 1920s. Last year, the 128-year-old firm, whose corporate name is Schluderberg-Kurdle Co. Inc., lost $1.86 million, following a loss of about $600,000 in 1983. Esskay Relocation Averted

Earlier this year Esskay said it was planning to relocate to Indianapolis, which would have resulted in about 460 layoffs. But sometime in late February, Baltimore city officials tried to rescue the company by working with bank executives to assemble a financial package to build a modern plant.

Meanwhile, Smithfield, which has been profitable every year since it was founded in 1936, was working behind the scenes to lure Esskay.

"I initially approached Esskay three and a half years ago," Luter said. "They came back to me through an intermediary about one week prior to the announcement that Smithfield had reached a tentative agreement to acquire Esskay ."

"It happened very fast," Luter said, adding that the Esskay deal should be finalized in about 30 days. "But that's the way we operate. When we see something, we act a lot quicker than most companies this size."

In December 1984, Smithfield moved aggressively to purchase Patrick Cudahy Inc., a 95-year-old Wisconsin pork company, for about $29 million. The acquisition, which added canned hams and dry sausage to the company's processed meat lines, pushed Smithfield squarely into the national market and boosted its revenue.

Profits for the 1985 fiscal year, ended in April, climbed 42 percent to $3.5 million ($1.22 a share) from $2.4 million (86 cents) for the previous year. Sales climbed 24 percent from $541.6 million to $661.1 million.

Earnings continued to rise into the first quarter of fiscal 1986, jumping to $638,000 (24 cents) on sales of $188.6 million, compared with a loss of $732,000 (19 cents) on sales of $131.4 million in the same period last year.

Smithfield's sales are expected to reach $900 million for fiscal 1986, according to Kenneth M. Gassman Jr., a financial analyst with Wheat First Securities Inc. who follows Smithfield.

The venerable pork purveyor has managed to grow in an industry that recently has seen some lean times. The amount of pork imported from Canada and Europe has increased, while consumer demand for pork products has slackened.

"There have been a lot of adverse comments toward red meats in the last couple of years," Luter said. "And a lot of it's unjustified. If you measure the calorie count and cholesterol count of pork and compare it to many other things, it's really not a problem."

Not so, says the Center For Science in the Public Interest. "Meat is the largest source of saturated fat in the American diet," said Bonnie Liebman, director of nutrition at the center. "Too much of any kind of fat is linked to breast and colon cancer, and too much saturated fat is linked to heart disease.

"Saturated fat in food also raises the cholesterol in the blood, which increases the risk that you will have a heart attack," she added.

Liebman also said that two thirds of the pork consumed is processed meat, which is among the fattiest foods in the diet.

"Hot dogs, ham and lunch meats are also the second-largest source of sodium, which may raise blood pressure and lead to heart attacks and strokes," Leibman said.

Even before health concerns about red meat increased, the industry had an extremely low profit margin.

"Out of each dollar's worth of product sold, the meatpackers make only one penny of net profit after taxes," said Ewen Wilson of the American Meat Institute. "There just isn't any other manufacturing industry that has this narrow profit margin."

One step meatpackers have taken is to reduce labor costs, the largest segment of their operating budget. "There has been a tremendous adjustment in union wage rates in the last two years," Wilson explained.

Operations at Smithfield's Gwaltney meatpacking facility halted in March when contract negotiations with the Teamsters local there snagged, leading to a weeklong strike. A new contract was ratified April 1.

Another reason meatpacking plants can survive despite narrow profit margins is because of sheer volume. "We have the capacity to slaughter and process 2 million hogs a week nationwide," Wilson said.

In the past two years, however, there just haven't been enough hogs. Two years ago, the industry was hurt by the worst corn crop in 50 years. "That drove up corn prices, which is the major component when you're raising hogs," Wilson said. "So we only processed 1.4 million hogs instead of 2 million. Our profits were dismal."

"The industry is operating at about 75 percent ot its capacity," Luter added. "It's very tough, and it's very competitive."

Several major pork processors have been forced to close their pens in recent years, including Tobin Packing, Rath Packing, Penn Packing and Marhoefer Packing, said Gassman of Wheat First Securities. Others, such as Wilson Foods and FDL Packing, have had severe financial problems, he said. Hog Cycle on the Upswing

The hog cycle, however, appears to be entering a more favorable phase for meatpackers, thanks to changes in the nation's corn supply, according to Gassman.

"If farmers can get more for their corn by feeding it to hogs and then sell the hogs for more than the corn would yield, then the hog production increases," wrote Gassman in a soon-to-be-published report.

Gassman said that corn prices have been pushed down because farmers have been growing more corn since last year, when the government discontinued certain farm aid programs.

"It appears that we are entering a phase where corn production will now be diverted into hog feed, and the supply of hogs will increase," Gassman said. "This, in turn, should push the price of hogs down. Cheaper hogs mean better operating margins for the pork processors, such as Smithfield Foods."

Smithfield has the capacity to slaughter up to 8,000 hogs daily -- close to 900 hogs an hour -- in each of its three major plants.

The pork process ends in a highly automated, state-of-the art factory where neatly packaged, airtight plastic packets of sliced bacon and ham roll off the conveyor belt. But it begins outside, behind the plant, in a stinking, muddy blood-stained pig pen. Inside the Gwaltney of Smithfield slaughterhouse, visitors are allowed only a few mintues' stay lest the stench of dead pigs cling to their clothes and bodies long after the visit has ended.

The process begins when the squealing hogs are corralled from their pens up a wooden plank where a worker stuns their heads with an electric shock.

As they fall from the shock, a worker quickly hangs the pigs upside-down from a conveyor belt, placing their rear legs in a metal clamp. Sometimes, the stunned hogs fall off the conveyor belt and regain consciousness, and the workers have to scramble to hoist the hogs' legs back into the metal clamps before they begin running wildly through the confined area.

The hogs actually are killed by a worker who stabs the stunned and often still-squirming animals with a knife in the jugular vein and lets most of the blood drain out. The freshly butchered pigs then move from the blood-splattered slaughterhouse into the scalding pot, which removes most of their hair.

From there the boiled carcasses travel along the conveyor belt into an oven, where they are blasted with a torch-like flame of natural gas to singe off any remaining hair. The hogs then continue along the belt into a 30-degree cooling room, where they remain for 24 hours before being moved to what is called the killing room, although they have long been dead.

Until 1960, hogs at the Smithfield plant were still conscious when they were butchered. But Luter said that his company was the first southern meatpacker to use a "humane slaughter installation," which originally put the animals to sleep by gas.

Killing-room workers in hard hats and laboratory coats shave any remaining hair on the hogs and rip out their guts before the animals move to the tumultuous cutting room, where they are split in half after moving under a razor-edged rotary saw. The severed carcasses are deboned and then distributed through chutes to the other sections of the plant, where they are cooked, cured, smoked, stuffed, sliced and packed.

"We use just about everything one way or another except the hog's squeal," said Willie Edwards, a Gwaltney quality-control technician, as he pointed to the vat of flesh-colored intestines used to make chitlins.

Smithfield is vigorously contesting a fine of $1.28 million levied in June by a federal court for violating federal water-pollution control laws in its hog-processing operations. The company was convicted of discharging pollutants in excess of the allowed amount into the Pagan River, which runs alongside the sleepy, southern town of Smithfield (population 3,718), billed as the "ham capital of the world."

Smithfield's nine plants around the country, employing about 4,300 people, produce a variety of fresh pork and processed meat products, ranging from fresh pork cuts, including pork loins and spare ribs, to the aged and specially cured "genuine Smithfield" ham -- which by Virginia law, can be so labeled only if it is processed in the town of Smithfield.

Bacon, fresh sausage, dry sausage, franks, luncheon meats, boneless hams, canned hams and country hams all roll off the Smithfield assembly lines.

The processed meats are marketed under several brand names, including Smithfield, Luter, Jamestown, Gwaltney, Williamsburg, Patrick Cudahy, Agar and the "Great" line of poultry-based products, and distributed to the Northeast, Mid-Atlantic, Southeast and Midwest.

Smithfield products also are distributed and marketed to a minor extent in the Caribbean and to the U.S. armed forces' commissaries throughout the world.

"We slice about 1.5 million to 2 million pounds of bacon a week and the same amount of franks a week," said Aaron D. Trub, the company's vice president, secretary and treasurer.

Smithfield has not always been living so high on the hog. In the late 1960s and early 1970s, it suffered its darkest days after Luter sold the company for three times its book value to a Washington conglomerate, Liberty Equities Corp.

"I left in 1969 simply because a guy came along and offered me an awful lot of money at the time," said Luter. The guy was C. Wyatt Dickerson Jr., a flamboyant Washington businessman and husband of former TV commentator Nancy Dickerson.

The firm was soon sued for alleged fraud by the Securities and Exchange Commission, and amid a flurry of management shifts and subsidiary selloffs, it headed into a financial skid with $17.4 million in long-term debt. Luter to the Rescue

Luter, who had been developing a successful, second-home development at Bryce Mountain near Basye, Va., couldn't stand to see the demise of the business his family had helped to build in 1936. Luter's father and grandfather, Joseph Luter Jr. and Sr., had started the smokehouse beside the Pagan River after quitting their jobs at Gwaltney, which had been making hams since the 19th century.

After his father's death in 1962, Luter had climbed swiftly up the ladder of the company -- then called Smithfield Packing Co. -- and emerged as president four years later at the age of 26.

So, as the firm was tottering on the brink of bankruptcy under new management in 1975, Luter returned to rescue it. Since then, he has moved steadily to boost his company's earnings by cutting costs and increasing his plant's output.

"By buying up companies in the last four years, we've been buying capacity," Luter said. "We can buy them cheaper than we can build capacity ourselves. Construction costs today are about $125 a square foot if you wanted to go out and build a new plant. You can buy plants today for one-tenth or less on a square-foot basis."

Luter is optimistic about turning around his latest financially troubled acquisition, and expects to put more production through the Esskay plant within a year.

"We'll close down part of the plant, and we'll streamline other parts of the plant," he said. "We're also trying to negotiate a new contract with the union, and are asking for some changes in work rules."

One of the biggest advantages of buying Esskay is that the Baltimore firm, which doesn't slaughter its own hogs, will process the fresh meats produced by Smithfield and Gwaltney, said Smithfield vice president Trub. "It will be a source of supply for Esskay and a tremendous outlet for fresh hams and pork bellies that we've been selling to other companies," he said.

Luter attributes his financial success over the years to his choice of employes. "I try to surround myself with good people," Luter said.

But his colleagues, analysts and other meatpackers say he's being modest. "Luter really knows the business," said LeRoy Joseph, president of Esskay, the company Luter is about to acquire. "He makes decisions and moves. You could call him a mover and a shaker."

"Luter is a hard-driving kind of individual who has a thorough knowledge of the meatpacking industry," said Trub of Smithfield.

"Luter has the reputation of being one of the best -- if not the best -- managers in the pork-processing industry," said Gassman of Wheat First.

"He has the ability to go into a pork-processing plant and turn it around singlehandedly," Gassman added. "He has that keen insight -- that art -- to know exactly what to do and do it. He's done it at Gwaltney, and he's expected to do it again at Cudahy and at Esskay."