To what extent can the psychological insights that Freud brought into the world be attributed to his prolific use cocaine?
Pretty much nil. Freud became interested in cocaine in 1884, in his capacity as a medical doctor, relatively soon after he had graduated with a medical degree, and while he was casting around trying to find a thing to make him stand out from the crowd. He relatively quickly wrote a now-infamous paper published in a Viennese medical journal that was half advocacy and half scientific research. While cocaine is very well known today for its addictive qualities, and its mood-altering qualities, Freud also emphasised - like The Weeknd in 'Can't Feel My Face' - its anaesthetic qualities; subsequent to Freud's paper, chemists isolated the aspects of cocaine that had an anaesthetic quality, minus the addictive/mood-altering stuff, and put it on the market as novacaine. In the paper, Freud also infamously downplayed the addictive potential of cocaine, seeing it as potentially being used to treat opiate addicts, much like methadone is today.
Freud also appears to have used cocaine himself, largely as a kind of antidepressant (remember, also, that this is years before prozac or valium were on the market) and as a kind of social lubricant. Freud was still enthusiastic about cocaine by around 1886; he appears to have still used it in moderation until the mid 1890s, according to Peter Gay. Remember also that this is during the period that sometimes gets called 'The Great Binge,' when the use of mood altering or mind altering drugs was quite legal, and quite common. This was the period when Arthur Conan Doyle's Sherlock Holmes character was a user of cocaine, and a small amount of cocaine was famously included in early recipes for Coca-Cola. So there was no particular sanction or legal troubles that Freud received for their advocacy of cocaine. There's also no particular suggestion in the sources that Freud was addicted to cocaine - he was an occasional user, it seems, rather than the coked-up fiend people imagine when they hear about it.
When it came to Freud's construction and formulation of his theories, the distinctive stuff of psychoanalysis - the idea that much mental life is subconscious, etc - this is something that developed in the mid-to-late 1890s, after the 'seduction error' (where he had come to believe that sexual abuse by fathers was much more widely prevalent than had been thought at the time, and which Freud soon came to see as wrong/an error). The idea that much mental life is subconscious, etc, was fleshed out in a book published in November 1899, The Interpretation Of Dreams. By this point, Freud does not seem to have been using cocaine with anywhere near the frequency he used it in the mid 1880s, if at all - it, at least, does not feature in his letters to family members, for example (where in the mid-1880s, he mentioned it quite frequently to Martha Bernays, his fiancee at the time).
So no, cocaine was not going to have an enormous impact on Freud's construction and formulation of his theories - it was a decade afterwards. What does come across in Freud's biography is his deep desire to make an impact in the world of psychology/medicine - the cocaine episode is probably best seen as an early and too-rushed example of that deep desire to make an impact.
(The main reference here is Peter Gay's book Freud: A Life For Our Time)