Seeking to capitalize on its strong lead in the U.S. automobile market, General Motors Corp. today announced plans to invest $40 billion by the end of 1984 to increase production of high-mileage cars and trucks in the United States and other countries.

Thomas A. Murphy, running his last annual meeting as GM chairman called the capital investment plans "the most ambitious product and facility improvement program ever undertaken by any corporation anywhere in the world at any time in history."

With a pointed jab at Ford Motor Co. and Chrysler Corp., he noted that GM's two main domestic competitors recently have announced reductions in their capital spending budgets caused by the severe slump in car and truck sales in the past year. Murphy predicted the cutbacks would force GM's U.S. competitors to limit the variety of vehicles they sell in future years.

The five-year, $40 billion capital spending program represents an acceleration of the previous plan to spend $38 billion over six years, and is meant to speed up the conversion of GM's line to more efficient front wheel-drive vehicles and diesels. By 1983, GM expects to be building 6 million front-wheel-drive vehicles a year, a fivefold increase over the current capacity, Murphy said.

Murphy recognized that the increase in capital spending would come at the expense of earnings and shareholders' dividends in the first quarter of 1980 to $1.15 a share compared with $1.50 in the final quarter of 1979 and $2.50 for the fourth quarter of 1980.

"We're having a tough time now -- our earnings and our dividends reflect that all too plainly. Nor is it likely to get much better tomorrow or the day after tomorrow," he said.

But with an easing of pressures on consumer credit, a recovery in auto sales should be underway by the end of the year, he said, with total car and truck sales reaching 13 milliion vehicles for the year.

The investment in new assembly plants in Pontiac, Mich., and St. Louis, replacing 60-year-old facilities, and the completion of other plants in Oklahoma, Texas, Louisiana, Kentucky, Michigan, and nine foreign countries, will permit GM to redesign its vehicle lineup for the 1980s, he said.

He provided new details, however, on the new subcompact that will be introduced next spring to replace the Chevrolet Monza and Pontiac Sunbird. "Going forward, there will be more new four-passenger cars and some cars significantly smaller than anything we offer today," he said. One of these small cars will be powered by batteries and will be introduced in the mid 1980s. "This gasless vehicle is real, not visionary," he said.

Murphy, who reaches GM's mandatory retirement age of 65 at the end of the year, made a combative denial that the influx of imports, particularly Japanese autos, was due to poor planning, timidity, or a blind love for the gas guzzler on the part of General Motors.

He contended that GM could not have anticipated an abrupt switch by American car buyers away from larger cars and trucks to the small compacts and subcompacts that are a Japanese specialty, following the Iranian revolution and the gasoline lines of 1979.

The "Monday morning quarterbacks" who make this criticism have it wrong, Murphy claimed. Even with this "panic" by American motorists, who turned their backs on standard size cars and trucks, GM was able to increase its share of the U.S. market from 46 percent early in 1979 to 47.55 percent at the end of the year because of its three-year campaign to reduce the weight and size of its vehicle and increase their mileage.

Murphy said it is "highly unlikely" that Japanese manufacturers or other foreign car makers will establish major auto manufacturing plants in the U.S. He renewed his warnings to Japanese car makers to voluntarily limit exports to the U.S. or risk new trade restrictions.

During the annual meeting, several shareholders proposed that United Auto Workers President Douglas Fraser be appointed to the GM board, a post he now occupies with Chrysler. Murphy opposed the idea, calling it a conflict of interest and the proposal got the support of less than 1 percent of the shareholders.

GM was also pressed by several shareholders to support faster introduction of the airbag passenger protection system.