If you cane someone who was brought up with violence, it can reinforce the idea that only the strongest wins. On the other hand, trying to be nice to them won't work if they want the $100K they make from drug dealing.
The sad fact is that nothing works perfectly, but at least we can strive to make it consistent, which is probably the biggest problem in most penal systems.
In fact plenty of historical evidence suggests it not only doesn't work, it makes reoffending more likely.
There's no space for "Well, obviously..." in prison management. Effects are often not obvious at all.
This is fine if you really want revenge porn, but not so much if you want a saner and less criminal culture.
A strong claim. A few minutes of searching found no strong evidence for or against its effectiveness, or that is superior or inferior to incarceration. Much more seems to have been written about the morality and public opinion of the practice (e.g. [1, 2]). It is known that corporal punishment of children causes developmental harms, but this does not extend naturally to adults.
1: https://journals.co.za/doi/abs/10.10520/EJC85246
2: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2722140
Do you think your countrymen are prepared to cane women then?
If not, you'll know why this isn't a good idea.
But, unfortunately, a sufficiently dangerous person does need to be physically put away. Being held against your will may well do wonders for people you threaten.