The company’s fortunes cratered as demand for Covid-19 vaccines plummeted. But it was busy working on something else.