I am a self-taught programmer and I do not have imposter syndrome. I have a degree in electrical engineering and when I thought that was going to be my career I did have imposter syndrome, so I'm not immune. I wonder if there's a correlation. It seems that many if not most professionals suffer from imposter syndrome; I wonder if that's related to the way they learned.
When I say self-taught, I don't mean I never took a class, I mean the majority of my programming skill was learned by doing/outside of classes. I took a Java class in high school that helped me graduate from procedural languages to OOP, and I took classes in college but with few exceptions the ones that were practical (vs theoretical) covered material I already knew.
I assume you’re implying my confidence is due to having limited competence and thus overestimating my competence? The fact that I have imposter syndrome when I imaging trying to be a professional electrical engineer (despite having a degree) seems counter to your presumed argument.
A degree, or good reviews from collegues are good indications you are competent. But also these are not proof: it could be a result of incompetent collegues, or an education that was not that good.
Not having a degree, but saying you know for sure to not have any Kruger raises lots of eyebrows for me: you do not know what you do not know.
Coming back to op's original question: the correlation comes from that education shows you what you do not know. You are getting involved with all kinds of subjects, and you get a grasp of how many there is left to learn and how smart certain things are. You might for example have never thought about the complexity of a compiler. This can make you feel dumber than if you would have never found out these fields existed.
Imo I think kruger is much more harmful than imposter