How would one apply self-sovereign identity to ration face masks?

I’m reading that Taiwan has been limiting, to two a week, the number of face masks people are allowed to buy. The thesis is that it is better that most people have a few, instead of few people hoard a lot, to protect the population as a whole from COVID-19.

They implement it the straightforward way: would-be purchasers must show a national identity card, and there is a centralized database that tracks the purchases against the national identifier. You only get to buy one if you haven’t exhausted your allotment for this week. Other places, like California, do the same thing for certain medications (e.g. Sudafed), and certainly would apply it to face masks, too, if they felt like they needed to ration them. (We’ll see about that.)

Obviously, from a privacy perspective, this system is terrible. The pharmacy has no business to know whatsoever what my full name is, my address, my date of birth, and all of those things that tend to come with centralized ID cards: all information I am forced to hand over to before I can buy my cold meds in California, or a less than one-dollar mask in Taiwan. On the other hand, whatever system is implemented must be reasonably hard to circumvent, otherwise it is pointless.

So, friends in the self-sovereign identity community: how would you guys solve this problem in a privacy-preserving way that nevertheless has the same effect?

Hint: This is a great PR opportunity (in spite of the calamity), and perhaps a tech deployment opportunity, because we can be sure that what Taiwan started about masks here will be followed by others in short order. (I notice that the prices for face masks – in particular the shipping charges! – on Amazon seem to increase by the day.) And why not help out with helping people have more access to protection equipment, while also giving them privacy? There are worse use cases for identity technology than that!