This can be learned by anyone!! This is not a binary idea. The more "complete unknown" concepts in said task the more likely anyone is to seize up - good programmers (or basically any engineer) are just more practiced than most at overcoming a lack of knowledge.
Now you also need to recognize when you're in over your head (in terms of knowledge, in terms of capital, etc). I could attempt many car repairs myself, but the time and capital required is typically prohibitive. Of course one would have to first make an attempt on the problem to make the analysis.
On the other hand, some people never develop this in their whole lives.
We get so caught up in the question of "can everyone program" that we forget to ask if everyone should. There's a massive contingency of folks who couldn't care less about breaking down problems into their constituent parts and writing code to solve them.
I am a big believer that a person should try many things in varied fields -- math, art, science, music, athletics, and so forth -- and discover what they're 1) naturally gifted in and 2) what they're interested in. Then they should nurture those skills.
We would never dream of taking a person who was not gifted at basketball, and also hated it, and push them to try and be in the NBA. We don't encourage tone-deaf singers, who also don't get a kick out of performing, to become touring musicians.
In many other fields we acknowledge that a level of talent is necessary, and we also accept that not everyone is born with that talent. Further, we accept that not everyone even cares to HAVE that talent. Yet in programming we further this notion that if you aren't good at programming or don't want to learn, you're not trying hard enough, the fault lies with you - ur doin' it rong! It's the worst kind of narcissism to think that people who can't or won't do this thing we love are simply being defective people.
If you wanted to learn to play the guitar, learn to take good photos with a nice camera, learn how to decorate your house in a tasteful or fashionable, basically anything you don't have any experience or knowledge in, how do you do it? The people who haven't learned how to learn either simply DON'T do it or they use their social group to find someone to teach them or pay somebody.
You can get pretty far without being able to teach yourself things, but for some skills especially those you have no idea about you have to be able to research and learn yourself.
You think folks who can't solve "trivial" problems are afraid. I disagree. They just "don't see it" the way we do. It's the difference having talent gives you.
The reason I think it's fear, and maybe I'm just projecting, is that anytime I didn't do something it was out of fear. Hell, that still happens in life sometimes now. I won't touch that car repair because "What if", or I won't buy that girl a drink because I suck a conversing with normal people and "What if". To add to the anecdotes, my father is a blue-collar worker, smart, very capable man who dropped out in the 9th grade. He won't touch a computer to save his life, he's of the notion that he'll irreparably break something important. Maybe folks just don't care, or don't believe in themselves, but fear stops a lot of folks from trying a lot of things. Like anything in life, it's not going to be black -and-white.
I like the chef example. I know from past discussions here that there is a large contingent of HN posters who are terrified of their own kitchen, which is a shame.
My spouse got sick with a pretty nasty colon disease. She was not able to do much for a long time.
Cooking got fun. I still suck, but I suck a whole lot less now. But that's not important. What matters is cooking turned into fun. I play, explore, and enjoy learning new things, which come increasingly easy. And the more you play, the better the food. The better the food, the more you are surrounded by people who enjoy your food. We will cook together now. And it's a nice evening. Get some good, or new ingredients, and go.
Chefs are awesome.
And they share too. They know the strong relationship people have with food can bridge a lot of differences. And when people enjoy the work, there is a lot of simple gratification and bonding associated with all of that. I can totally see doing that for a career and being very happy. Strange, having it all be so foreign not so long ago...
The thing is, most of us can do this. Good, basic, well prepared food is within reach of most anyone. Worth it, IMHO.
First, practice, practice, practice. I spent waaaaay too much time in high school writing/designing/building projects. By the time I hit university, I could write a compiler or build a web application. Old hat. That's always going to be a hurdle folks who are serious about programming are going to have to get over, I just did it early on so when I started working with others I was ahead of the curve.
The big problem I've noticed among my friends at school that floundered vs the ones that succeeded, and that of the (great) professionals I've worked with is the ability to solve problems. Some folks look at a task like "build a web application" and seize up at enormity of the task. Others, start breaking down the problem into it's component parts. Pick the front-end, back-end tools, database, and drill each piece further down. I think this is just as important, if not more, than raw coding talent, especially since strong problem decomposition skills apply across the board.
I'm regularly amazed/annoyed when folks can't solve trivial computer problems not because they are hard, but because they are afraid to jump into the deep end and start making educated guesses, googling, just plain trying. I'm not a teacher, manager, or any kind of people herder so I'm not really sure how or why folks are like this, but if you just try to tackle the problem, you'll eventually get somewhere. Overtime you build up knowledge, experience, and mistakes and you become that 10x programmer, or that 10x chef, or that 10x <thing>.