Closing auto plants outright — rather than idling them, as G.M. says it plans — has been rare since the industry emerged from the recession. The last permanent shutdown of a plant in the United States came in 2016 when Mitsubishi Motors shuttered one in Normal, Ill. Before that, Ford closed a truck plant in St. Paul in 2011.

More typically since rebounding from the recession, carmakers and their suppliers have restarted shuttered plants, adding new ones across the South and hiring tens of thousands of workers a year.

But demand for small and midsize cars has plunged. Two-thirds of all new vehicles sold last year were trucks and S.U.V.s. That shift has hit G.M.’s Lordstown plant hard. Just a few years ago, the factory employed three shifts of workers to churn out Chevy Cruzes. Now it is down to one. In 2017 the plant made about 180,000 cars, down from 248,000 in 2013.

More broadly, the yearslong boom in car and truck sales in North America appears to be ending, said John Hoffecker, vice chairman at AlixPartners, a global consulting firm with a large automotive practice. “Sales have held up well this year, but we do see a downturn coming,” he said. AlixPartners forecast that domestic auto sales will fall to about 15 million cars and light trucks in 2020, from about 17 million this year.

Even though they are facing a potential slump, carmakers continue to spend heavily to develop electric vehicles and self-driving technology, both to meet regulatory mandates and to anticipate the future of driving. That shift is expected to remake the global industry and enable companies to enter new and potentially lucrative businesses, such as driverless taxi and delivery services.

At the same time, automakers have had to contend with a new political agenda in Washington. One benefit has been the corporate tax cuts enacted last year. The changes, championed by Mr. Trump and his party, saved G.M. $157 million in federal taxes in the first nine months of the year, according to the company’s most recent quarterly earnings report.