Thousands of Amazon.com Inc. sellers who built their businesses using China’s cheap and efficient manufacturers are on the spot as the coronavirus shuts factories there.

Sellers say Amazon’s ranking algorithm demotes products that are out of stock. To avoid that painful fate, many are raising prices to slow sales, and attempting to shift production to other countries.

Larger...