When your debit card keeps declining for a few times but eventually goes through at Walmart it likely is an issue with Walmart's card reader.
Although sometimes it could be a network problem between the credit card processor, credit card processing machine and the bank.
When you use your debit card or credit card at Walmart or any other store it has to send the information from Walmart's system and into other systems and servers before reaching the bank where the money is withdrawn from.
The network has to verify the card and information which can sometimes fail before going through.
It's frustrating and also happens to me from time to time.
Most times it has been an issue with Walmart's credit card and debit card processing machines.
You can try tapping the debit card on the card reader if your debit card or credit card has that feature.
Most times I find that using the tap feature of the debit card and credit cards works much better.
As long as your card is good and you have the money in the account it should eventually go through.