The frenzied stock-buying activity that may have saved AMC Entertainment Holdings Inc. from bankruptcy is opening up a potential escape hatch for other troubled borrowers as well.

More companies with steep financial challenges are seeking a lifeline from equity markets, eager to capitalize on the surge of interest in stock buying from nonprofessional investors. Earlier this month, coal miner Peabody Energy Corp., offshore drilling contractor Transocean Ltd. and retailer Express Inc., all announced plans to sell stock, betting equity markets will support them despite heavy debt loads, recent losses and industry headwinds.

Selling stock isn’t the typical way for distressed companies to grab a lifeline. More often, they are forced to seek out rescue loans, sell off assets or pursue a merger, which can be difficult because of their existing debt.

But equity markets now are more open to supporting troubled issuers, in large part because of risk-hungry individual investors eager to speculate, according to bankers and investors following the trend.

The planned equity sales, if successful, mark another way nonprofessional investors have reshaped financial markets since they began to demonstrate their collective power last year, creating opportunities for finance executives in the process.

“It’s a new phenomenon for some of these distressed companies,” said Scott Hartman, partner and co-head of corporate and traded credit at asset manager Värde Partners. “If I were in their seat, it makes a lot of sense to take equity capital when they can.”

Peabody, Transocean and Express are seeking to replicate—on a smaller scale—the capital-raising success of AMC, a favorite pick of individual investors who gather in online investing forums such as Reddit’s WallStreetBets.

AMC raised $2.2 billion through several stock sales during the pandemic, largely to an enthusiastic following of day traders, despite warnings it was at risk of bankruptcy.

It is difficult to classify even a highly leveraged company as distressed when its access to equity is “seemingly infinite,” said Andy Moore, chief executive of B. Riley Securities Inc. His firm is acting as sales agent for Peabody, which earlier this month kicked off an effort to sell up to 12.5 million shares through an “at-the-market” offering. In such offerings, companies sell shares bit-by-bit at market prices in a manner that is accessible to individual investors as well as institutional ones.

Since exiting bankruptcy in 2017, Peabody has faced difficulties as utilities rely less on coal, and it restructured debt in February to avert a default. The company’s bonds trade at discounts of between 69 and 78 cents on the dollar, indicating market doubts they will be fully repaid. It reported an $80 million net loss in the first quarter amid continued weak conditions for the coal industry.

Express, the apparel retailer, borrowed money from private-equity firm Sycamore Partners in January to stockpile cash for surviving the pandemic. Then the company launched an ATM stock sale earlier this month, aiming to sell up to 15 million new shares, despite reporting a loss of $405 million for the last fiscal year as a result of the pandemic and its impact on shopping.

On Tuesday, offshore driller Transocean joined in with an offering of up to $400 million in shares despite a junk credit rating, more than $7 billion in debt, and ongoing creditor litigation over its restructuring efforts last year.

Peabody and Express didn’t respond to requests for comment. Transocean referred inquiries to its securities filings.

Jamie Zimmerman, founder and CEO of hedge-fund manager Litespeed Management LLC, said that some troubled companies may be unable to raise new debt, and selling stock may be their only path to obtain financing.

“You don’t get unless you ask,” said Dan Zwirn, founder and chief executive of asset manager Arena Investors LP. “If I’m structurally insolvent and can’t refinance myself into extending the life of the enterprise, I might as well take this shot.”

“With this infusion of retail people, there are more counterparties for such a transaction,” Mr. Zwirn added.

Inflows of capital from individual investors, some using money from federal stimulus funds to open trading accounts, have buoyed the broader stock market, driving gains of more than 10% year-to-date for the Dow Jones Industrial Average and Nasdaq Composite Index.

Individual investors’ share of overall U.S. equities trading volume rose last year to roughly double what it was a decade before and continues to grow. At times, their bets on beaten-down stocks have beat out institutional investors.

Howard Fischer, a securities lawyer with Moses & Singer LLP, said that the underlying economic health now seems less important than the unbridled enthusiasm of individual investors, even if that enthusiasm is divorced from any rational economic analysis.

Hertz Global Holdings Inc. tried to ride a wave of interest from retail traders to finance itself last year while it was under bankruptcy protection, and ended up scrapping the effort under pressure from the Securities and Exchange Commission.

The bullish individual investors who bet on the business shortly after it filed for chapter 11 were vindicated when Hertz found buyers agreeing to pay up to $8 a share in value.

Adi Habbu, a director on the credit trading desk at Barclays PLC, said widespread bullishness in equity markets goes beyond retail traders, and is fueled by the economic recovery and the easing of pandemic restrictions.

“It’s certainly not a bad time to try,” he said. “The core trend is that there is positive reopening sentiment that is driven not just by retail but by institutional players as well.”

Write to Alexander Gladstone at alexander.gladstone@wsj.com and Soma Biswas at soma.biswas@wsj.com