I don't think your DH was wrong in the moment to not skip straight to the food DS wanted as you don't want to encourage that. Also, not wrong to teach DS to hang his coat up but I agree with you that the "punishment" was too long afterwards.
I think you need to talk and agree a longer term plan for those 2 situations. Agree an easy post nursery snack - weetabix/porridge/yoghurt, egg on toast etc. Maybe have a few options and DS can choose. My DD is a bit younger but I tend to just give her a snack type meal after nursery (fruit, yoghurt, cheese). I don't think she'd eat a full on meal at that point after 2 x main nursery meals.
For the coat, maybe talk with DS about how it's important, how the house would look if you all threw all your coats on the floor (if you have as many coats as we do it'd be a huge pile!) and you wouldn't be able to get to the door (make it comical). If that doesn't work, maybe a chocolate button after his snack if he hangs it up, a special new peg for him, maybe he doesn't get to choose his snack (or do other thing he likes to do at home after nursery) until he has hung it up? Basically try and find an immediate natural consequence. If you and your DH agree in advance then at least you'll be on the same page even if its a bit of a compromise on how you'd each choose to handle it.
Although to be honest at 3.5 I think all our pegs were too high for my DS and I must have just stripped his coat off him and hung it up myself! I'm planning now to get a 4 cube storage thing in the hallway and have a box each so that each persons bits (including coat for the kids) can just be chucked in there.
I'd read "How to talk so kids will listen and listen so kids will talk" (there's also a book for little kids - I think "How to talk so little kids will listen and listen so little kids will talk"). I probably need to read it again actually.