No country did that, why are you making things up? China stopped people from leaving their houses but at the same time provide supplies and delivered food through organized effort for weeks. That was well documented by even foreigners living there.
Hell, let's not use China's example, what about countries like Singapore, South Korea, New Zealand, etc all managed to be both democracies and selectively enforce rules at the same time?