2 Year Old Cockapoo Forgetting That He Is House Trained…?

My dog is over two years old. He has been house trained for awhile, but for a few months he has been pooping on the floor is my husband and I leave at the same time. It is deliberate, I have taken him around the block and then gone to the grocery store for twenty minutes, come back and he had pooped. There had been ample time to do it on the walk before.
We take him for a walk every day, cuddle and play with him, he is alone from about 8:00am to 5:30pm, but there are lots of toys to keep him entertained.
Recently he added peeing on the floor to his way of punishing us.
What can we do to stop him?

ulverston restaurants