Flush with cash, Facebook, Apple, Amazon, Microsoft and Google are positioned to emerge from a downturn stronger and more powerful. As usual.SAN FRANCISCO — Apple, Amazon, Microsoft and the parent companies of Facebook and Google have lost $2.7 trillion in value so far this year, about the annual gross domestic product of Britain.So what have the companies done about this thrashing on Wall Street? Microsoft has doubled its employees’ bonus pool, Google has committed to hiring more engineers, and Apple has showered its top hardware talent with $200,000 bonuses.The dissonance between the stock market’s relative panic and the business-as-usual calm among tech giants foreshadows a period when analysts, investors and economists predict that the world’s largest companies will widen their lead in their respective markets.The bullishness about their prospects reflects an understanding that the companies have tight control of some of the world’s most lucrative businesses: social media, premium smartphones, e-commerce, cloud computing and search. Their dominance in those arenas and toeholds in other businesses should blunt the pains of inflation, even as those challenges hammer big companies such as Walmart and Target and the stock market nears bear market territory.The S&P 500 spent much of Friday below the threshold for what is considered a bear market — commonly defined as 20 percent below its last peak — before rallying late in the afternoon. The index ended the week with a loss of 3 percent, its seventh straight weekly decline. That’s its longest stretch of losses since 2001.In the months ahead, Microsoft, Google, Apple and Amazon are expected to boost hiring, buy more businesses and emerge on the other side of a bearish economy stronger and more powerful — even if they shed some of their total valuation and their relentless growth of the last few years.“Big tech can say, ‘Forget the economy,’” said Richard Kramer, founder of the London-based advisory firm Arete Research. Flush with cash, he said, “they can invest through the cycle.”Read More About Apple‘After Steve’: Jony Ive, who helped define Apple’s iconic look, left as the Tim Cook era took hold. A new book details how they and the company changed following Steve Jobs’s death.A $3 Trillion Company: Four decades after going public, Apple reached a $1 trillion market value in 2018. Now, the company is worth triple that.Trademarks: The tech behemoth has opposed singer-songwriters, school districts and food blogs for trying to trademark names or logos featuring an apple — and even other fruits.AirTags: Privacy groups said that Apple’s new coin-size devices could be used to track people. Those warnings appear to have been prescient.The large companies’ plans contrast sharply with a wave of spending cuts crashing through the rest of the tech sector. Steep declines in share prices at unprofitable companies such as Uber, down 45 percent, and Peloton, down 58 percent, have led their chief executives to cut jobs or consider layoffs. Start-ups are pruning their workforces as venture capital funding slows.Those companies’ plummeting values will create buying opportunities, said Toni Sacconaghi, a tech analyst at Bernstein, a research firm. Large deals may be difficult because the Federal Trade Commission is scrutinizing takeover moves by Facebook, Apple, Amazon, Microsoft and Google, he said, but smaller deals for emerging technology or engineers could be rampant.As people return to work and travel, they are making fewer Amazon purchases, leaving the company with more space and staff than it needs.Roger Kisby for The New York TimesDuring the Great Recession, Facebook, Amazon, Google, Apple and Microsoft acquired more than 100 companies from 2008 to 2010, according to Refinitiv, a financial data company. Some of those deals have become fundamental to their businesses today, including Apple’s acquisition of the chip company P.A. Semi, which contributed to the company’s development of its new laptop processors, and Google’s acquisition of AdMob, which helped create a mobile advertising business.“The big will get bigger and the poor will get poorer,” said Michael Cusumano, deputy dean of the Sloan School of Management at the Massachusetts Institute of Technology. “That’s the way network effects work.”There are caveats to this sense of invulnerability. The big companies’ plans could always change if the economy continues to deteriorate and consumers pull back even further on their spending. And some of the big companies are more vulnerable than others.Meta Platforms, Facebook’s parent company, has fared worse than its peers because its business is facing long-term challenges. It has posted falling profits as its user growth slows amid rising competition from TikTok, and changes in Apple’s privacy policy stymie its ability to personalize ads.Mark Zuckerberg, Meta’s chief executive, has responded by instituting a temporary hiring freeze for some roles. During a recent all-hands meeting with staff, employees asked if layoffs would follow. Mr. Zuckerberg said that job cuts weren’t in the company’s current plans and were unlikely in the future, according to a spokesman. Instead, he said the company was focused on slowing spending and limiting its growth.Amazon sent a similar signal to its employees last month after it posted disappointing results. In a call with analysts, Brian Olsavsky, the company’s finance chief, said Amazon would look to corral costs after it doubled spending on warehouses and staff to keep pace with pandemic orders. As people return to work and travel, they are making fewer Amazon purchases, leaving the company with more space and staff than it needs.But Amazon’s lucrative cloud business, Amazon Web Services, or A.W.S. for short, continues to gush profits. The company plans to lean into its success in the months ahead by increasing its spending on data centers. It also has committed to raising the cap on base compensation of its corporate staff to $350,000, from $160,000. And it is investing in a plan to build a network of satellites to deliver high-speed internet by launching 38 rockets into space.Between them, Facebook, Microsoft, Google, Apple and Amazon had nearly $300 billion in cash, excluding debt, at the end of March, according to Loup Ventures, an investment firm specializing in tech research.The cash reserves could fund accelerated stock buybacks as share prices fall, analysts say. Doing so would increase the companies’ earnings per share, deliver more value to investors and signal to the market that their firms are more valuable than Wall Street is willing to acknowledge.The companies roared ahead during the pandemic as people sequestered at home immersed themselves in a digital world. Customer orders soared on Amazon, for everything from hand sanitizer to Instant Pots. Shuttered stores shifted sales online and ramped up Google and Facebook advertising. Remote students and employees splurged on new iPhones, iPads and Macs.The last tech giant to cull its ranks during a major downturn, Microsoft, is doing the opposite during this turbulent period. Emboldened by a business that has proved more durable than its peers, Microsoft is sweetening salaries, boosting its investments in cloud computing and standing by a $70 billion acquisition of Activision Blizzard that it expects to unlock more sales for its gaming empire.A Call of Duty event in Minneapolis in 2020. Microsoft’s acquisition of Activision Blizzard is expected to unlock more sales for its gaming empire.Bruce Kluckhohn/USA Today Sports, via ReutersSimilar resilience has been on display at Google and Apple. Google, a subsidiary of Alphabet, recently overhauled its performance review process and told staff that they would likely get pay increases, according to CNBC. It also plans to increase its spending on data centers to support its growing cloud business.Tim Cook, Apple’s chief executive, has a longstanding philosophy that Apple should continue to invest for the future amid a downturn. It more than doubled its staff during the Great Recession and nearly tripled its sales. Lately, it has increased bonuses to some hardware engineers by as much as $200,000, according to Bloomberg.John Chambers, who steered Cisco Systems through multiple downturns as its former chief executive, said the companies’ strong businesses and deep pockets could afford them the chance to take risks that would be impractical for smaller competitors. During the 2008 downturn, he said Cisco allowed distressed automakers to pay for technology services with credit at a time when competitors demanded cash. The company risked having to write down $1 billion in inventory, but emerged from the recession as the dominant provider to a healthy auto industry, he said.“Companies break away during downturns,” Mr. Chambers said.Excelling will require disregarding the broader market’s gloom, said David Yoffie, a professor at Harvard Business School. He said previous downturns had shown that even the strongest businesses were susceptible to profit pressures and prone to pulling back. “Firms get pessimistic like everyone else,” he said.The first test for the biggest companies in tech will be contagion from their peers. Amazon’s shares in the electric vehicle maker Rivian Automotive have plunged more than 65 percent, a $7.6 billion paper loss. Apple’s services sales are likely to be crimped by a slowdown in advertising by app developers, which rely on venture-capital funding to finance their marketing, analysts say. And start-ups are scrutinizing their spending on cloud services, which will likely slow growth for Microsoft Azure and Google Cloud, analysts and cloud executives said.“People are trying to figure out how to spend smartly,” said Sam Ramji, the chief strategy officer at DataStax, a data management company.Regulatory challenges on the horizon could darken the big tech companies’ prospects, as well. Europe’s Digital Markets Act, which is expected to become law soon, is designed to increase the openness of tech platforms. Among other things, it could scuttle the estimated $19 billion that Apple collects from Alphabet to make Google the default search engine on iPhones, a change that Bernstein estimates could erase as much as 3 percent of Apple’s pretax profit.But the companies are expected to challenge the law in court, potentially tying up the legislation for years. The probability it gets bogged down leaves analysts sticking to their consensus: “Big Tech is going to be more powerful. And what’s being done about it? Nothing,” Mr. Kramer of Arete Research said.Jason Karaian contributed reporting. More