AMERICAN FARMERS are being sold down the river.

You can actually see it happening by standing in a Missouri midnight at Lock 22 on the Mississippi, right in Mark Twain's Hannibal backyard, watching a late August traffic jam of grain-laden barges waiting to be shuttled on toward New Orleans and then to overseas customers.

Sights such as this gladden the hearts of politicians and farm organization leaders who see grain exports as the road to salvation for the faltering farm economy. But on the corn and soybean farms just a stone's throw from the lock, this traffic doesn't bring the elation you might expect. There's restrained pleasure that the Russians are buying more grain again this summer, but no real sense of salvation -- most farmers know better.

There is increasing evidence that the policies promoting massive exports of American farm products, down from record highs a couple of years ago but still in the $35 billion range this year, have only worsened the crisis in U.S. farming.

The crisis is social, economic and environmental. The pressure to produce more and more food is rapidly changing the shape of rural America, creating larger and larger farms, undermining community structure and businesses. It is driving farmers to make indefensible investment decisions. And it is forcing them to squander the resource base of soil and water that must be kept whole to feed future generations.

Export agriculture has become so vital to the American farmer that the crops from about two of every five acres he harvests now are sold abroad. An astounding 65 percent of the wheat, 55 percent of the soybeans and 35 percent of the coarse grains -- corn, sorghum, barley -- produced in this country go to buyers overseas.

This is achieved at high cost. With little regard for the future, farmers are mining the soil and water to grow still more grain to add to the surplus that depresses their price. Some of the nation's best topsoil is eroding at shocking rates because of the pressure farmers feel to produce more. The vast underground reservoir known as the Ogallala aquifer, underlying the Great Plains grain belt, is being depleted rapidly to irrigate fields that were meant only for dryland farming. Rich hardwood forests of the lower Mississippi Valley are being cleared systematically for conversion into land for cultivation of crops that add to the glut. At the same time, urban encroachment is eating away some of the most productive farmland, and shrinking the base for future production.

"We can see evidence of a depleting resource base," Sen. Roger Jepsen (R-Iowa) said this month, pointing out that soil erosion each year wipes out the productive capability of enough land to feed, clothe and provide lumber for a population the size of San Diego, a city of roughly 1.8 million people. "Preservation of the resource base for present and future . . . production should be paramount. This is basic to national security."

As they deplete the resources, these same farmers go deeper into hock, expanding their debt and their size just to keep pace. They continue to spend billions of dollars annually for unrenewable oil, petrochemical fertilizers and pesticides, seeds and expensive machinery that help them grow grain that sells for less than it costs them to produce. The good times of the mid-1970s, when prices were high and export demand was rising, have become the bad times of the 1980s, with recession and foreign competition leaving farmers high, dry and frightened.

Soil conservationist R. Neil Sampson has put it this way: "Farmers face a constant level of inflation in the cost of the things they purchase, without an offsetting steady rise in the price of the goods they sell. . . The impact on young farmers, or those trying to overcome cash flow deficits, is devastating."

This litany might be understandable, although hardly acceptable, if farmers in general were getting fat and rich from exports. But precisely the opposite is the case. In the dizzying decade of farm export growth that began in 1970, sales went from $7 billion to more than $40 billion. Yet farm income actually has gone down, farmers' debt-interest costs are about equal to their income and the cost of federal support programs has zoomed to record proportions.

The American farmer, in effect, ends up subsidizing foreign countries, which find it more convenient to buy cheap U.S. food than to invest in their own self-sufficiency. American topsoil and water, used up to grow food, is sent off to places like the Soviet Union, China and Japan in the form of grains that those countries cannot produce in adequate amounts to feed their populations. Contrary to popular notions that American farmers are feeding the world's hungry, the bulk of the exports go to the more developed nations that can afford to pay cash.

U.S. taxpayers further subsidize these same clients by providing cheap irrigation water that adds to the agricultural bounty, and by underwriting the cost of the the river transportation system and ports so vital to moving the grain.

Something obviously is very wrong with farming, American-style, and it's generating wide concern among policy makers. The $21 billion price tag of federal farm-support programs this year, in league with the political and social stress of agricultural recession, have ignited a full-scale debate over the future of U.S. farm policy.

The issue takes on timeliness with a presidential election next year and with Congress scheduled to write a new four-year farm bill, the basic roadmap for agriculture, in 1985. Farm groups are holding policy forums. Secretary John R. Block this summer held a "summit" to get agribusiness thinking about policy changes.

But with the exception of a few boat-rockers like Rep. James H. Weaver (D-Ore.), former Iowa Gov. Robert Ray and Walter W. Goeppinger, a respected Iowa farmer, most of the politicians, farm organization leaders and agribusiness executives who presume to speak for American farmers are talking and marching in lockstep.

As they have done virtually without exception for 25 years, they urge more exports as the most expedient way of unloading American surpluses. This approach became graven into policy after the Soviets made huge, unexpected grain purchases here in 1972. The Nixon administration urged farmers to expand their plantings and count on a continuing upward surge of income and exports.

The talk today points in the same direction: more market development, more credit gimmicks for the developing countries, more federal subsidization of exports, more vending of processed food overseas, more punitive measures against competing nations that are crowding American farmers out of their traditional "safe" markets.

For the sake of argument, let's call this bankrupt thinking, literally and figuratively.

The Carter administration, in its final days, suggested as much in its controversial "Time to Choose" study of the changing structure of U.S. farming. Exports in the 1980s, the report said, "will tend to have high additional costs -- both for farmers . . . and in a broader social and economic sense, in raising food prices, intensifying the use of renewable and nonrenewable resources, and putting further stress on the environment." The entire report was so antithetical to market-oriented Reaganites that Block's USDA has allowed it to go out of print.

Farm exports unquestionably are important to the American economy and the foreign buyers who rely on U.S. farmers. Even with imports of roughly $16 billion worth of food this year, we will be left with an agricultural trade balance of $20 billion. That balance is crucial in the country's ability to pay for its oil and other necessities.

But basic questions remain avoided or unasked. For example, at what point do these export proceeds become diminishing returns? At what cost to the American natural resource base of rich soil and abundant water do we produce food for the world? Why should the American farmer be required to subsidize a world over which he has no control and which dictates his prices?

Congress, for one, and the Reagan administration, for another, have shown little inclination to grapple with questions of that sort in their debating of farm policy. Bright ideas get shot down with regularity. In 1981, for example, Weaver was virtually laughed out of the Agriculture Committee when he resurrected an idea he had floated on a number of occasions.

Arguing that export prices ought to reflect the stress on the natural resource base, Weaver wanted to create an export grain bank that would set an official U.S. price for commodities sold abroad. Free-marketeers were aghast at the idea of intruding in markets that way. Never mind that global agriculture is basically protectionist. Never mind that several other major exporting nations handle their agricultural sales through government boards, or through government-mandated price ceilings and subsidy programs.

Weaver's proposal was defeated in the Agriculture Committee, then voted down as a floor amendment after the big private grain-trading firms put out the word against it. He still picked up 135 votes.

Ray, the former Iowa governor, was so frustrated over the sight of his state's eroding topsoil being sluiced down the Mississippi that he raised the idea of a special tax on export crops to help pay for repair of the land. Ray left office early this year before he could follow up and his idea has gone to pasture.

More interesting, perhaps, is the thinking of Walter Goeppinger, an Iowa farmer who feels that the intense pressure put on the land by export farming may be the ruination of American agriculture. He worries about the ability of U.S. farmers to maintain markets if their best soil washes away.

What makes this important is that Goeppinger long has been a champion of expanded agricultural exports. He was a founder and president of the U.S. Feed Grains Council, which promotes overseas sales and new markets.

"Fence-to-fence, free-market-oriented policy has turned into an economic disaster for the farmer and a soil-loss tragedy for the nation," he wrote recently in the Des Moines Register. He proposed a mandatory idling of 20 percent of all soil used to produce field crops, resting the soil for three years by planting it in grass. In 15 years, all U.S. cropland would have been rested and rebuilt.

"A 20 percent cut in our crop acreage would still produce more than enough for the domestic needs of the United States and leave ample quantities of grain for export," he wrote. "Foreign cash customers should be given first place at our export-buying window and credit customers could come after them in buying any that is left."

If the policy makers would stop and listen, they would understand that Weaver, Ray, Goeppinger and others like them are saying it is time for the United States to approach its most important industry with the same rationale the OPEC nations have applied to their petroleum. They justify their prices by arguing that their oil is a nonrenewable resource. Mine it, sell it, it's gone.

In agriculture, the rationale has tended to be the opposite: a bushel of wheat is a renewable resource. Grow it, sell it, grow it again, sell it again. But that is arguable. If the soil and water base is depleted, as is increasingly the case, the bushel of wheat becomes a nonrenewable resource.

There will be no cheap solutions, or easy answers, to the problems that American agriculture now faces. In seeking them, it will be necessary to consider the interests of a diverse group: consumers at home and abroad, and, above all,,less developed nations for which America remains a granary of last resort. These groups have a common interest in seeing that American farmland remains as fruitful in the future as it is now. That one hope will be threatened if unbridled exports continue to sell farmers down the river.