It actually worked poorly … a lot of people left Wuhan because of rumors of impending lockdown, causing the virus to spread. If it had “worked”, France, the US, Italy, etc wouldn’t be in the shit right now.
There’s no evidence that a less-than-complete lockdown would have worked any less without the gross abuse of civil liberties. Cases in parts of the US where there’s been a less-than-complete lockdown (basically, places of public assembly closed) are flattening as I write this.