It always amuses me how people talk about the obesity crisis and how children were so much better in the 70s/80s.
Well, we had a tuck shop with crisps and sweets and full-of-artificial rubbish drinks, and cans. And lots of children bought stuff every day.
Of those who brought things in from home, one thing that was very popular was jelly squares. That's a strip of the squares from the stuff you make jelly from. Bringing in fruit was definitely unusual. There was squash with school lunches, sugary puddings covered in custard, chips most days, and many children had money to buy sweets on the way home from school. We'd have biscuits with our milk, and the teachers often gave a sweet as a reward. My dm used to meet us every day with a cake to eat on the walk home, and she wasn't the only mum who did that.
I remember one day the head walking into assembly with a box of lollies for everyone. I think someone had donated them, but can't quite remember. We all sat there sucking them while he explained we had them during assembly because you shouldn't run with one in your mouth so he didn't want to give them at lunch/break. Maybe they were just a teaching aid?
And there wasn't an obesity crisis.
Now we restrict foods round schools, hospitals. Complain if the children are given a cake or sweets. School dinners only offer water, and chips are frown upon (I remember my dc's junior school used to do fish and mashed potato instead of fish and chips) and I don't know a school that still has a tuck shop. And I see no sign of the obesity crisis reducing.
So it clearly has far more to do with something else, probably the less active lifestyle has at least something to do with it, than these things. Maybe even by making them forbidden we're increasing the issue.
To the Op, I don't think one cake means your dc doesn't eat dinner for 3 days unless you're talking about a 6" one. But if you think it does then give your dc a box and tell them any treats like that go into the box and they can have them after dinner.
I think dog's birthday is silly, especially as you can guarantee that at least one dc has gone home and asked when their goldfish's birthday is and can they take something in, but I don't think the other things are that unreasonable.
Why not when it gets to your dc's birthday send them with a non-food alternative? I always sent mine with stickers, and they loved giving everyone a sticker at the end of the day. A few other parents picked it up too. I did it because my dbro had an allergy to azo-dyes in the 80s before anyone thought of E102/E110 etc being a problem and they were in every sweet, so he couldn't ever have treats like that. Actually I did very well out of that because he'd normally give them to me. 🤣