Cookies are for Hikers!
Can you afford cookies in your calorie budget? If you are an average Joe, you’ll happily have a cookie when you get a chance, ignoring any line of reasoning against it. I’m not judging, I love a nice cookie myself. Here is my idea of how to have a cookie and eat it too (if that makes any sense at all).
If you try to supplement your running energy sources like gels and power bars with cookies (why the hell not?), you might find yourself choking on crumbs while trying to breathe heavily and have a crunch at the same time. Trust me, I tried. Unless you have a very moist and possibly greasy cookie, those crumbs will make you caugh like you have a two-sided pneumonia.
There is only one reasonable way I can see you can have a well deserved cookie, and that’s on a hike. You see, on a long hike you need calories anyway - no matter the macro makeup of your food. You’ll burn it all anyhow, why not have something tasty? Cookies have loads of fat to keep you going well after your mouth forgot the taste of the last bite, some slow carbs to help energy supplies before the fat kicks in, and enough sugar to make you happy while you’re eating it. Proteins? Dude, seriously?!
Since you are not breathing uncontrollably, at least not all the time, or you can take a short stop to enjoy a cookie, as you are probably not trying to break your PR, in either case you’ll be alright. And in the end you don’t have any sense of guilt because I convinced you so, right?! ;).
Consider bringing other food you feel guilty about to your hike next time as well.