It's so complicated.
I'm fat, I was a fat kid too. I am really trying my best not to make the same mistakes with my toddler. I understand nutrition and cook healthy meals, but it's something I have to give a lot of thought to.
I have to ask myself what a healthy weight person would eat/portion sizes. It does not come naturally to me as I have never really managed it, I can lose weight or gain weight but I find it such a struggle to maintain, there is 8 stone difference between my highest and lowest weight and ATM I'm somewhere in the middle.
It's a mindset I have to get into to be able to lose weight, I think I am a comfort eater, when things are going wrong I want sweet things to make me feel better.
But even when I'm fatter like now it's not because I just live on crap. I still get my 5 a day and eat well and that is the example I want to model for my toddler, it's when he is asleep that the sugar fix happens 
Just for context, my toddler is allowed sweet things, I am wary of making it the forbidden fruit so he does have chocolate and ice cream in moderation but it does not make up the majority of his diet.
He eats avocado, salmon, prawns, most veg, Greek yoghurt, only ever brown bread etc. But if you saw us out together and we were eating an ice cream, you would probably judge us, I wouldn't blame you tbh. He is 98th centile for height and weight so in line with each other but he is big. DH is 6ft 5 and I'm 5ft 10 so I guess genetics plays a part but I am aware that people probably thing I feed him rubbish all the time when I really don't.
The issues run deeper than just not eating crap, it's hard to explain if you don't need to think about everything you eat and are feeding to your kid, I have to think about whether a normal healthy weight person would eat it and it's hard to judge sometimes but I'm trying my best and that's all I can do!
Just to give you a glimpse into the issues you're talking about lol, I have no idea what the solution is, I want to fix this and make better choices for myself and my child but even I don't know if I am managing it so someone who doesn't want to has no chance to be honest!