Esskay meatpacking company, the area's second-largest producer of pork products, hasn't exactly been bringing home the bacon lately.

The financially troubled East Baltimore firm, which supplies ballpark hot dogs to Orioles fans and processed meat products to supermarkets, has been losing money for years. Earlier this year, it looked like Esskay would have to leave Maryland for an area with lower labor costs. Relocation might have resulted in the loss of up to 600 jobs in the Baltimore area, company officials said.

But last week, Esskay and union officials were able to reach a tentative agreement that, if approved, may dissuade the 126-year-old company from leaving Baltimore.

"This is a landmark agreement," said Robert L. Walker, an Esskay vice president. "It represents a golden opportunity and significant turning point in the long history of the company."

Under the agreement, hammered out in an all-night session between Esskay officials and the company's largest union, the United Food and Commercial Workers, workers will receive $1.60 an hour in raises spread over five years, starting with 20 cents immediately and 25 cents an hour each September until 1989, when they will get a 40-cent hike.

"We would have liked more of an increase in wages and a shorter contract," said Richard Eventoff, a United Food and Commercial Workers official. "But when we weigh this against the company being able to stay in Baltimore and build a new plant, we're satisfied with the agreement." The Operating Engineers local that represents Esskay workers accepted a similar agreement Friday.

Although these unions represent most of Esskay's 600 workers, the company still must reach a similar agreement by Nov. 4 with Teamsters Local 355, which has 75 workers who drive Esskay's blue and red trucks and make deliveries.

"The Teamsters now hold in their hands the fate and future of Esskay," Walker said. "And they are not the kind of union that necessarily says 'me, too,' " he added.

The 202-to-171 vote on the Esskay agreements by the United Food and Commercial Workers local may have been so strikingly close because the package the workers accepted was similar to one they overwhelmingly rejected just four weeks ago.

One feature in the agreement that helped change some votes is profit sharing. If the financially strapped company succeeds in making a profit, eligible workers would get a 25 percent share in profits after the company takes out 10 percent for costs related to stockholders.

The agreement also establishes a stock purchase plan, which would allow eligible employes to buy non-voting common stock at a discount of 10 percent off its market value.

The tentative contract also stipulates that Esskay embark on a program to recruit the "best available managerial personnel."

"Attracting better managers is an industrywide problem," Walker said. "This isn't a glamorous industry."

The agreement's acceptance by the engineers and food workers unions was the result of nearly continuous bargaining between Esskay officials, union representatives and the office of Baltimore Mayor William Donald Schaefer. The mayor's office became a major participant in the negotiations after the first agreement failed a month ago.

After a new agreement was initialed by negotiators for both sides, Schaefer made a pitch to workers to ratify it. "It was a hopeless situation before the mayor got involved," Walker said. "He was a miracle worker. There was no way the workers would have accepted the agreement four weeks ago. . . . "

"We believe that this agreement was essential to keeping the plant in Baltimore. The loss of 600 jobs at Esskay could have a significant impact on our economy," said Daryl Plevy, a Schaefer aide.

Esskay's troubles reflect the larger problems facing the meatpacking industry nationwide.

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

But meatpacking plants can survive in spite of their narrow profit margins because it's generally a high volume business. "We have the capacity to slaughter and process 2 million hogs a week nationwide," Wilson said.

Lately, however, there just haven't been enough hogs, Wilson explained. "Last summer [1983], we had the worst crop in 50 years. That drove up corn prices, which is the major component when you're raising hogs. So, we only processed 1.4 million hogs instead of 2 million. Our profits were dismal."

Because of the volatility of the hog market, Esskay discontinued its hog-slaughtering operation last November and laid off 140 workers. Company officials also blamed the layoffs on higher labor costs from a recent strike settlement.

The problems that plague pork packing are exacerbated by problems in the general economy. For one thing, the cost of money is high. "High interest rates combined with our low profit margin has really hurt us," said Esskay's Walker.

One step pork packers 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," explained Wilson of the meatpacking association. "The bulk of the packers are in the Midwest. Those national packers in the Midwest who are rolling back their wages have been able to put more of a squeeze on a company like Esskay."

If last week's tentative agreement is approved by the Teamsters union, Esskay may start building a new plant by next summer. The company already is trying to arrange for $5 million in private financing to flesh out $10 million in city and state financing.

Although Esskay officials predict the firm would lose more than $1 million this year, a new building is seen as necessary for efficiency and cost-saving reasons. "It would be the newest, most efficient plant with the best processing equipment," Walker said.

The present Esskay factory, which has sections dating back as far as the 1920s, is considered antiquated. "With six floors and 22 elevators, it's grossly inefficient," he said.

While the old meatpacking plants were multi-storied structures, those built today have a single floor where everything is moved on a conveyor belt. "These plants are very automated," Wilson said. "There's considerable cost saving when you build them."

The present Esskay plant, situated on 17 acres, has 700,000 square feet and a lot of excess capacity. The new facility, to be located behind the existing plant, would have only 160,000 square feet, Walker said.

The space factor points up what may be another cost-saving advantage to a new building: With less space, the company would have to lay off some employes, which Walker said it hopes to do by attrition.

Although Esskay probably will remain in Baltimore if the new agreement is approved, company officials haven't ruled out the possibility of relocating some or most of their operation. The firm had threatened in 1981 to relocate unless it got some wage concessions. For the moment, Walker acknowledged that Virginia officials, including Gov. Charles Robb, have made numerous overtures. Virginia, a right-to-work state, has lower wage and benefit standards.

Esskay manufactures more than 150 beef and pork items and sells 1.4 million pounds of products every week. Hams, hot dogs and sausages account for the most sales. About 400,000 hot dogs are produced each day.

In Washington, Esskay sells primarily to Safeway, but supplies Giant with peppered meats such as corned beef. Ten hot dogs, or one pound, sell for $1.69 at Safeway, 60 cents more than eight all-chicken Gwaltney franks. Smithfield and Gwaltney, Esskay's main regional competitors, merged last year.

About half of Esskay's market is in the Baltimore-Washington area, but the company also distributes to 16 other states. Esskay also exports to the Middle East, Western Europe, Bermuda, Puerto Rico and Japan.

Esskay's saga began in 1858, when William Schluderberg, who was involved primarily in the slaughtering end of the business, opened a butcher shop on Butcher Hill, an East Baltimore area with street names such as Blood Alley and Tanners Lane.

While Schluderberg's business grew and prospered, another enterprising businessman, Thomas J. Kurdle, started his retail meat business in 1880. By 1919, the two companies had merged. The new company was pretty evenly divided between the two families until a few years ago, when William G. Hupfeldt became the prime owner and stockholder.

Esskay's formal corporate name today is Schluderberg-Kurdle Co. "Esskay" resulted from the first letter in each of those family surnames -- 'S' for Schluderberg and 'K' for Kurdle.