FRANKFURT—Coronavirus infections are rampant in Germany but most of the country’s factories are still humming, sketching a blueprint for countries seeking to support economic activity through the pandemic.

Nonessential businesses sit idle across swaths of Europe, and attempts by manufacturers in the U.S. to keep plants open have caused tensions with workers. Germany could show the way for badly hit countries like Italy, which are considering how to restart production when the worst of the crisis has passed.

...