It's not that you're a bad programmer, but after reading the article you're doing the nerd-at-the-dance fallacy and doing the old spray and pray. Do the work to identify a fit, then go there and make the case for why you fit. Places where you'd just be a number are not for you because you're not a leetcoder and you don't do politics, which is totally fine.
Nerds at the dance don't identify a fit, they either don't shoot their shot, or they shoot every shot and see what lands. When you haven't identified a fit saying "I see you have a square hole there, check me out I'm your square peg" people know, and that type of limp introduction is received more as a "alms for the sick" type of interaction where you're asking for them to bequeath you with labor.
Also, lift some weights. Sounds like the rest of your life is in order, financially, skills, etc, but no mentions of fitness. When you're physically pushed to your limits, the trivial parts of life become a lot less uncertain. That confidence is exuded from every pore. What you have right now is a mind problem, a me problem, and misaligned expectations.
In your mind you're saying: They dont want me I'm a bad programmer
In reality: I have not found my square edges, I wouldn't know a square hole from a dimple or why I'd want either one.
In your mind you're saying: Other people dont have these problems, it's just me, the imposter who got themself into this programming nonsense.
In reality they're saying: Other CEO's dont have these problems, it's just me, one manager, sifting through all these flighty leetcoders who practiced the test, but not tested the practice.
In your mind you're saying: I expect a suboptimal outcome because I am suboptimal, so why try.
In reality: I feel suboptimal, I look suboptimal, I will now perform suboptimal because everything I put in my gastank was suboptimal. Stop that nonsense.
Stop listening to yourself and be better. Go find you a hole, and pick up something heavy along the way.