ONLY a few years ago, in the depths of the recession, the local car dealership seemed to be living on borrowed time. Franchises were closing by the hundreds as buyers stayed away from what were increasingly seen as outmoded showrooms.

Now, with the economy back, auto sales are booming, and investors seemingly cannot get enough of the hardscrabble business of “moving metal.” This month, Berkshire Hathaway, Warren E. Buffett’s holding company, completed its acquisition of the Van Tuyl Group, the largest privately held dealership group in the country.

The franchise car dealer is not only surviving, but even thriving.

A big reason for the revival is the simple math of fewer locations receiving more business. A decade ago, there were about 22,000 dealerships around the country. Today, that number is closer to 18,000. Also, strong franchise laws — fiercely defended in state legislatures — still give dealers a virtual monopoly on selling new cars.

But industry experts say the story goes much deeper than that, and reflects a profound shift in the business model of auto sales. Dealerships increasingly have the high-tech atmosphere of an Apple Store, and consumers arrive fully informed about a car’s features and price. It’s a marked departure from the high-pressure sales environment traditionally associated with dealerships.