if walmart was serious about stopping shoplifting they would close all self checkouts and return to cashiers at the checkout registers...
No, they just need to apprehend shoplifters, call the police, and press charges against them.
A simple computer program at self-checkout could easily alert security to people stealing. It's not difficult at all. Camera shows you 12 items in your possession but only scanned 9 of them. Security is notified. Scanner shows you scanned the same $0.99 battery 12 times. Security is notified.
You're apprehended at the door. Cops called. Charges pressed. Walmart quickly earns a reputation as someplace you don't want to steal from.