It is pretty much how China has handled it. It seems like it does actually work if your goal is to fully eliminate drug issues, but it's unacceptably harsh for most countries to palate.
A quick check suggests the penalty for possession is 3 years in prison, not life. No idea if that is a maximum sentence.
From what I can find, it looks like China does a lot of what the US does, including DARE style education, and that there is still (by Chinese accounts) quite a lot of illegal drug use.
I would think that since China is very nationalist and still fairly collectivist/anti-individualist, and has a grim history of drugs being used as a tool of foreign imperialism (the opium wars), drug use is much further out of the social "Overton window". I think that's a better explanation for apparently lower drug use than harsh punishments, because other states also have those (notably the US!)