I suspect there is a bidirectional relationship regarding quality relationships and cognition.
Even without direct evidence, there is indirect evidence that supports the lack of confidants affects cognition. Socializing is an experiment with measurable effects on cognition that I already mentioned. Animal models, which historically have been a pretty good proxy for human models, certainly support isolation affecting cognition. Prisoners put in solitary confinement show signs of deteriorating mental functioning. Close knit communities, not to be confused with rural communities, have much lower rates of mental illness (almost all of which deteriorate cognition after onset, some to devastating magnitudes) despite lower educational achievement. These lend support that the correlational data is not a simple matter of poor cogniton affecting social skills, and warrants actual experimentation.
I suspect there is a communication barrier between high-IQ and average-IQ people. Also, people tend to connect with each other through shared interests, and many with high-IQ also have high openness, lending oneself to have unconventional interests. With fewer people like you, it can lead to literal social isolation, and a feeling of disconnectedness with others. I don’t think this is autism per se, but I can see why many people with high IQs may think they have autism.