Stores still drive retail sales, but self-checkout, locked items and inventory gaps frustrate shoppers. Here is how retailers are responding.