The arsenal of democracy is busy these days at Air Force Plant No. 6. Where the Lockheed Corp. nearly died 15 years ago, 17,000 workers now move with an agile hustle among the heaps of aluminum and rivets and tires being fashioned into military cargo planes -- and record profits.

Five miles to the north, in the shadow of Kennesaw Mountain, one of Lockheed's 5,871 subcontractors also is flourishing. While Lockheed builds the world's largest airplane, workers at the Torco Inc. machine shop turn out thousands of slender metal pegs destined for the fuselage of that plane, the C5B. The pegs represent Torco's reentry into military contracting after an eight-year hiatus.

Colossal Lockheed and tiny Torco are among tens of thousands of beneficiaries of a spending spree so intense that aerospace sales this year are expected to break the record set at the peak of the Vietnam war. The industry's backlog, built mostly from Pentagon orders, has reached a staggering $133 billion. Defense production since 1980 has grown at three times the clip of U.S. industry as a whole.

President Reagan's $2.3 trillion buildup is like nothing ever seen in peacetime America. It has produced jobs, advances in science and, for many Americans, a renewed sense of patriotism. Renewal of Suspicions

With that pride, however, have come age-old suspicions of war profiteering by arms merchants.

The arsenal of democracy, as Reagan calls the weapons industry, is cashing in at an astonishing rate. And critics question whether it is delivering fair value for the taxpayers' billions.

Defense contracts are yielding profits rarely matched by commercial business; the Pentagon's top dozen companies earned more than $6 billion last year.

But few of those defense giants are paying any federal income taxes to help finance the buildup -- instead exploiting a giant loophole, known as "The Method" to industry accountants.

Some of the most profitable have collected tax refunds, payments from the government that amount to a negative income tax.

While charging the government inflated prices for everything from pliers to helicopters, according to Pentagon and congressional investigations, the companies often reward top executives with million-dollar salaries and other employes with wages far above national norms.

Nor does top dollar appear to be buying top quality. Just in the past year, the Pentagon has found improperly tested microchips and sloppily soldered missiles, as well as cracks in the wings of attack planes and the tails of its newest jet fighters.

Furthermore, there are vexing questions about whether the Pentagon is getting a lot less bang for a lot more buck.

Although warplanes today obviously are bigger and more complex, Air Force Plant No. 6 was cranking out three B29 bombers a day during World War II; today, Lockheed is muscling up to build one C5B a month.

Finally, a spotlight has been turned on the industry's ethics by allegations of improper billing for nuclear-warhead contracts (General Electric); falsifying bills on the MX missile (Sperry); billing taxpayers for boarding an executive's dog (General Dynamics); charging the Navy $25 million in legal fees (McDonnell Douglas); cutting corners in testing electronic chips (National Semiconductor) and billing the Pentagon for political contributions (Boeing).

Administration and business leaders contend that abuses are rare and unfairly sensationalized by the news media and congressional critics.

"We care as Americans, and we care as an industry," Roy A. Anderson, Lockheed's chairman, told Congress.

"Sure, industry has made some mistakes, but I believe that in relation to the magnitude and complexity of defense procurement, they have been isolated."

But former deputy defense secretary Frank C. Carlucci, who left the Pentagon two years ago, said he was dismayed that companies expend so much energy elbowing each other for a bigger slice of the pie.

"The biggest problem I have with the defense industry is their desire to expand their own program at the expense of the other fellow," Carlucci said.

"As I've told them publicly, it's kind of like rearranging deck chairs on the Titanic . . . . Maybe I am unrealistic and utopian, but certainly other industries have looked to the common good." Wages Take Off

It was only a quarter century ago that the Air Force used to scrutinize every contractor salary above $25,000 a year, reserving the right to approve or quash those deemed exorbitant.

Times have changed. The lowest annual pay for a chief executive among the top 10 defense contractors is just under $500,000. Several earn more than twice that.

Executive pay at a dozen large defense aerospace companies averages 42 percent higher than the average salaries and bonuses at comparably large commercial companies, according to a General Accounting Office study last fall.

The relatively high salaries aren't limited to the corporate brass, either.

The Congressional Budget Office last year found that aerospace workers earned 21 percent more than the average U.S. worker, even after adjusting for their higher skills and training.

Defense Department auditors last year found that security guards at 13 defense plants were earning as much as $26,000 a year more than guards at nearby commercial plants. Other studies show similar results for secretaries and janitors.

The Pentagon's interest in salaries is more than idle curiosity: about 70 percent of contract dollars underwrite wages, according to Maj. Gen. Bernard L. Weiss, chief of Air Force contracting policy.

The Defense Department has a legal obligation to ensure that those contractor wages are "reasonable," but the burden of proof for demonstrating exorbitance rests with the government.

That has been nearly impossible. An Air Force memo in March 1984 complained about contractor "wage escalations far in excess of actual inflation" and lamented that the Pentagon lacks the clout to challenge "excessive compensation costs."

Inflated salaries also boost a contractor's profits. Because profit often is calculated as a percentage of overall costs, the higher the costs paid by the government -- including reimbursement for wages -- the greater the profit.

The Pentagon may even pay for employes of the contractor who aren't working on government business. The Air Force memo cited one "blatant example" involving the Stanwick Corp., in which the Armed Services Board of Contract Appeals ruled that the Pentagon had to pay for "admittedly 'unproductive' engineers."

Why? Because, according to the memo, "the contractor had to retain its technical expertise in order to attract new work." Out of a Nosedive

After a brush with bankruptcy and a billion-dollar loss in the 1970s on a commercial jetliner, the L1011, Lockheed has found the secret of success in the 1980s: government work.

Lockheed, which now gets 85 percent of its sales money from the U.S. government, isn't alone. Boeing, General Dynamics, Litton, Martin Marietta, Rockwell and other giants with both government and commercial contracts have leaned increasingly toward the Pentagon.

The reason is simple: Work is bountiful and profits are dwarfing companies' earnings on commercial work. In some cases, defense work is 10 times as lucrative, according to an internal Navy study, a sharp reversal from the 1970s.

In 1983, Boeing reported a profit of $98 million on about $7 billion in commercial sales. Its military work, by contrast, reaped almost three times the profit -- $289 million -- on $2.6 billion in sales. Moreover, Boeing had nearly four times as much of its money tied up on the commercial side, according to company figures.

Across the board, the defense industry is flush with cash and boasting about it to stockholders. Lockheed: "1984 was the third consecutive year of record earnings." United Technologies: "Best year ever in 1984." General Dynamics: "For the first time in many years, all operating units were profitable."

Industry chieftains point out that when profits are calculated in proportion to sales, the returns are modest.

Lockheed, for example, earned about a 4 percent profit on sales last year, according to Lockheed-Georgia president W.P. Frech, who observed, "It's not the lucrative thing that people think."

But when using the yardstick most analysts say gives a truer picture -- return on equity, or profit as proportion of money invested -- quite a different story emerges. Lockheed ranked first among defense contractors, with a remarkable 87 percent annual return on equity during the past five years, according to Forbes magazine.

The Pentagon usually doesn't ask its suppliers how much profit they end up making, and companies balk at disclosing contract-by-contract earnings.

But some notion can be gleaned from a General Accounting Office study of several cases that Adm. Hyman G. Rickover had denounced as excessive:

* On a contract to supply cobalt material for large valves in Navy nuclear ships, the Cabot Corp. of Boston earned profits of 61 percent of the contract value.

* The Carborundum Co. of Niagara Falls, N.Y., earned 25 percent profits on a contract to provide boron carbide for Navy nuclear reactor cores.

* The United States Steel Corp. insisted on profits between 27 and 38 percent for high-pressure cylinders used in Trident nuclear submarines.

In each case, the companies either disputed the GAO's conclusions or asserted that the profits were in line with the difficulty of the job.

Since 1976, the Pentagon has steadily increased profits for its contractors in hopes that the companies will plough more cash into modern equipment. But an Air Force study in 1982 found that, while profits had increased sharply, "relative investment did not change."

Once again, the Pentagon is doing a major study of industry profits and investment, with results expected this spring.

Some critics say that contractors have little incentive to invest, either because the government often antes up its own money or because Pentagon logic frequently dictates that the more money a contractor spends building a weapon, the more profit he earns.

"Therefore, a contractor may actually see profits reduced as a result of efforts to improve productivity and reduce costs," two Pentagon officials concluded in Industrial Engineering magazine last year.

To encourage savings, the Pentagon has tried to replace "cost-plus contracts" -- which reimburse a company for whatever it spends -- with fixed-price contracts. But some contractors beat the system by shifting costs from fixed-price contracts in one part of their factory onto cost-plus work under way elsewhere, according to Pentagon investigators.

Inappropriate charging, for which General Electric was indicted last week, is common, the Pentagon told Congress last year.

"Because the government reimburses all costs which are allowable, allocable and reasonable, the contractor may increase profit by mischarging," the Pentagon added. "Frequently, work that is being done by low-level technicians is billed as being done by senior scientists or engineers at much higher rates."

In addition to paying a negotiated profit, the Pentagon reimburses contractors for part of their overhead costs -- electricity or clerical help, for example -- just as other companies cover overhead in the price of their products. But overhead has long been "the contractors' carpet, the one where you lift the corner to sweep the dirt under," according to Pentagon critic Gordon Adams.

Recent investigations have shown how General Dynamics billed taxpayers for such overhead expenses as babysitters for executives' children, kennel fees for an executive's dog and the purchase of a $546 mattress for an executive displeased with a standard hotel bed.

But General Dynamics isn't alone, according to George R. Spanton, who recently retired as chief Pentagon auditor at Pratt & Whitney's aircraft engine plant in West Palm Beach, Fla.

The government has challenged billings by Pratt & Whitney for such overhead costs as a Halloween party thrown for "employe morale" and a $67,500 donation to an Oklahoma arts society favored by an Air Force general's wife, Spanton said.

A spokesman for Pratt & Whitney said that the donation was charged in error and quickly withdrawn and that, in general, the company has not billed the government improperly. None of the charges questioned by the Pentagon since 1978 have been "negotiated" or resolved yet, the spokesman added.

"It's not billions of dollars," Spanton said. "But it gives you an idea of their 'I don't give a damn' attitude."' A Free Loan'

Hidden under the $314 billion the Reagan administration wants to spend on defense next year is an annex to the military budget: the money the government won't collect from defense contractors in taxes.

"When you have deferred taxes of $10 billion, that's a free loan," defense analyst Laurence Lytton said. "It costs the taxpayers $1 billion a year."

According to spokesmen for the companies, General Dynamics has paid no federal income taxes since 1972, Lockheed since 1979, Boeing since 1980. Grumman has paid about $30 million in the past few months, the company's first contributions to the Treasury since 1976.

In fact, like many American corporations, some defense giants have collected massive refunds from the government by taking advantage of 1981 tax legislation.

General Electric, ranked fourth in the defense industry, earned $6.5 billion in profits from 1981 to 1983, yet paid no federal income tax and claimed a refund of $283 million, according to a study by Robert S. McIntyre of Citizens for Tax Justice, a labor-backed interest group.

McIntyre said the five companies named above, with profits of $10.5 billion in the first three years of the Reagan administration, "have been able to exempt themselves from contributing one dime toward the cost of the national defense buildup from which they stand to profit so handsomely."

"It looks to somebody who looks at this for the first time that the company is getting away with something," said Doug Dahlgard, Grumman's director of taxes. "The story is really a lot longer than that."

None of the tax avoidance is illegal, Dahlgard said. Instead, the companies largely rely on what industry has come to know as The Method.

Construction companies traditionally used the "completed contract" method of accounting to delay paying taxes until a building project was finished and profits could be measured accurately.

In the mid-1970s, the Treasury Department expanded The Method, and defense contractors quickly turned it to their advantage, since arms contracts may remain open for many years. In 1982 Congress again tightened some aspects of The Method, and the deferred taxes eventually will be paid. In the meantime, however, the contractors get what amounts to hundreds of millions of dollars in interest-free loans.

"No question the company has made some fine uses of the deferred taxes," Dahlgard said.

In addition, defense companies have profited from the same tax-saving opportunities extended to other manufacturers, amounting to millions of dollars in investment credits and accelerated write-offs for the cost of heavy machinery and research credits -- even for projects financed by the government.

"Nothing is really fair in this world," Dahlgard said. "Everybody has to take advantage of every situation."