I used to struggle with a lot of this all the time, now I struggle with a smaller subset but still manage to do almost as much damage. I think I have the root cause nailed down but I have not found a solid answer yet.
#1 by a mile is my willpower and willingness to say F it and go for the hedonistic pleasure foods are massively impacted by how tired I am. If i start eating after 8 its never going to be because I am hungy, its going to be because I want the enjoyment of the food. There is no correlation with hunger, calorie intake, work load, etc. If i am over tired i am just way way more likely to say screw my long term goals I want a bowl of ice cream, and some chips, and some dip and before you know it its 3000 extra calories. Sometimes this would be okay, but the frequency is creeping up to more like weekly and that makes long term goal progress harder than it needs to be.
#2 is related to the first one, but I dont need to eat crap while watching TV. If i am going to eat some crap I dont need just because I enjoy it why am I doing it while watching tv and not even paying attention to the stuff I am eating. Absent minded TV eating is not worth the expense to my goals, adds a TON of calories, virtually no nutrition. This one has almost no redeeming qualities and just needs to go away. If i could just eat at the table and not eat while reading or watching TV i would eat less of the bad things and more of the good things almost by default. I am going to start to implement this one today and see what comes of it. The willpower one i have less ideas for.
If i could just not eat after 8pm except when out with friends for social events I would have met a ton of my goals years ago. I need to find a way to get 9am me to shout at 9pm me.