
It sounds like you are using walks for toileting so the garden is not being used as the place to go. Even if you lived in a flat or property without a garden you should train your dog to go in a place near the property, after all going on a walk when your dog needs to go won't always be an option, but popping outside isn't difficult. You need to set him up to succeed. You need to go back to the beginning and take him out after play and food for toileting and also at regular intervals and reward with whatever motivates your dog the most. The connection that going outside in the proper place gets a better reaction than doing it indoors will come.
Also as someone else has mentioned, you should restrict your dog's access to the rest of the house until he is housetrained. If you are working bring him with you, bring a drink and close the door. You will see if he needs to go out and can take him, where if he has free access he might need to go, go elsewhere and you will not know until it is too late. Alternatively if you feel the need to give access from the place you work to the kitchen, if he gets up to leave the room, follow him let him drink and then take him out. This will be much harder to get success with though than keeping him confined to the room you are in.
As for the eating poo, you might well find if you sort the house training this will follow. As someone else has mentions the eating could be a form of hiding what he has done. Another possibility is that it is another form of getting your attention. If he poos in the house, he gets your attention, if he eats it, he gets attention. You need to make it so that going in the right place gets him attention and something nice too.