I read an essay about Mongolia. When China locked down Wuhan they closed their borders, closed schools, and because they also had a shortage of masks simply told people that they had to save the N95 masks for healthcare workers. And had seamstresses sew cloth masks and sell them to pharmacies.
They did this without having any detected cases.