While others have addressed this in other ways, I was specifically thinking about disordered eating behaviour and other issues that make CICO simplistic and naive. While technically true, there are other factors that mean that CICO is not the whole story.
Take, for example, someone who has an addiction. Let's say this person is addicted to alcohol. They have been diagnosed with Alcohol Use Disorder and are undergoing cognitive behavioural therapy for it. But they have not yet been able to completely lose the habit of drinking six beers every night. Alcohol is sugar - sugar is metabolised into fat. Six beers every night is a lot of alcohol, therefore a lot of sugar, therefore a lot of fat. This person will be overweight, let alone the other health problems that are associated with alcohol addiction. They know what they have to do. Actually doing it is a very different issue, and one that people who have never experienced addiction almost always fail to understand.
Is the solution to this person "just stop drinking"? Clearly, if they could do that, they would not have a problem that includes a mental health diagnosis and therapy. Physical addiction just isn't that easy to shake off. "Just stop drinking" is about the least helpful thing that you can say to such a person. Trying to shame them into shaking off their addiction - which I repeat is a genuine disorder - is worse.
I may or may not be speaking from personal experience.
I'm of two minds about harping on CICO.
On one hand, you're absolutely right. Losing weight is simple, but not always easy. Changing people's habits is hard and often requires more thought than simplistic "eat less" tips. Developing diets and other approaches to weight loss that make compliance easier is a worthy goal. Shaming people is usually counterproductive, like you say.
On the other hand, there's tons of woo in the diet and fitness world. People make all kinds of nonsense claims about how weight loss actually works. There's money to be made selling magic powders and nonsense fitness programs. You see these myths repeated all the time and often it contributes to confusing people and making weight loss more difficult than it needs to be. In that way, harping on CICO is a nice reminder of reality. Every diet that works ultimately works because of CICO. Any advice or diet that tries to hide this fact, or worse, outright deny this fact, is probably a waste of time and effort. There are many different ways to achieve a caloric deficit, and people's own experience with different diets will vary, but ultimately a deficit is the only thing that works.
In my own personal experience, I had previously managed to lose a significant amount of weight (over 50lbs) and I found CICO very helpful. Logging calories accurately took a lot of the anxiety out of meal planning. Instead of having to worry about "good" or "bad" foods or deal with dieting in some vague way, it was like balancing a budget. You get X calories per day, use them however you like. Buy a cheap food scale and log everything. In time you learn that some types of foods result in less sensation of hunger (which is inevitable with any caloric defecit) than others, and you tend to pick those that make compliance easier. I could even budget in a couple beers here and there. For me, a mix of higher fiber carbs and lean proteins became the staple of my diet that helped manage the feeling of hunger, plus low calorie veggies for vitamins and variety.
Of course, the pandemic has not been kind and most of my healthy eating (and drinking) habits have gone out the window, but it's not mysterious to me why I've gained the weight, or what I need to do to lose it again.