Uses of the phrases 'Scotch douche', 'Scotch shower', and 'Scottish shower' in English, which are in evidence in print as early as 1839, may derive from earlier uses of the equivalent French phrase, douche écossaise (literally, "Scottish shower"), in medical-therapeutic contexts.
The French phrase, which at first refers to an alternately hot and cold shower, shows up as early as 1825, in Revue encyclopédique, ou Analyse raisonnée:
C'est dans cette salle que M. Despine, habile médecin, a établi la douche écossaise, dont il a obtenu de si heureux résultats dans le traitement des affections nerveuses.
[It is in this room that M. Despine, a skilful physician, has established the Scottish shower, from which he has obtained such happy results in the treatment of nervous affections.
— Translation from Google Translate.]
The French douche écossaise in later use has, in addition, a more figurative sense of a "series of ups and downs; roller-coaster ride" (translation of douche écossaise from Collins French to English dictionary). This later French sense is remarked by Harold Ettlinger in The axis on the air, 1943 (emphasis mine):
At that time too we saw the strategy of confusion worked so effectively on the French. We saw them subjected to what they called "a Scottish shower," alternately hot and cold, until people did not know what to think or believe, and until the majority reaction after Munich was a kind of benumbed relief.
The English phrase 'Scotch douche' appears in print as early as 1839 in connection with mineral water treatment for facial neuralgia (tic doloreux), in The Medical Examiner, Philadelphia, June 29 (emphasis mine):
Same waters taken internally, in baths, and Scotch douches upon the head....
"Same waters" refers to the waters "of Ussat, of St. Sauveur, of Salut at Bagneres de Bigorre, of Neris, Bains, &c.," all French hydrotherapy sites.
'Scotch douche' appears again in a descriptive paragraph in the July, 1847 issue of The American Journal of the Medical Sciences:
The shower bath is familiar to every one; but there is one form, often called the "Scotch douche," which is not much known. In this the shower is alternately cold and warm, causing rapid changes in the cutaneous circulation without much shock; it is used when reaction is feeble, as a preparative for the cold douche.
The first evidence of the exact phrase 'Scotch shower', in the sense of "alternately hot and cold shower", that I could find in English was in a series of identical advertisements for the "Sea Baths at Fécamp". Fécamp is in France, across the English Channel from Brighton, and so convenient to London. The ads appeared weekly from 10 May through 28 June 1861, then again 09 September through 26 September 1861, in The Morning Post, London, England (paywalled, 10 May example linked):
At the casino we find a gymnasium directed by a clever professor: hot sea-water baths, and fresh-water baths, with ordinary or Scotch shower baths....
A nearly identical version of this ad appeared in the 02 July 1861 edition of The Times (London; paywalled).
The first evidence I found in print of the exact phrase 'Scottish shower' (in the sense of "alternately hot and cold shower") was the 1943 use by Ettlinger, cited above with reference to figurative use of the French phrase.
English lexical translations of the French phrase show up in print at least as early as 1868, in the Medical lexicon...a French as well as English Medical Lexicon by Robley Dunglison, with particular reference to use of the therapeutic technique of alternating hot and cold showers:
DOUCHE ÉCOSSAISE, Douche, transition — d. Scotch, Douche, transition.
DOUCHE, TRANSITION, Scotch douche, (F.) Douche Écossaise. A douche, which consists in the successive use of hot and cold water.
Dunglison, a US physician, intends a specialized sense of the French douche (op. cit.):
This term is applied to a column of fluid, of a determinate nature and temperature, let fall upon the body. ... They may be cold or warm, according to circumstances. ... The Douche communicates a considerable and peculiar shock to the nervous system; and is one of the most successful means for taming the furious maniac.
Although the source of the French phrase douche écossaise, from which the English phrase appears as a matter of evident history to derive, must be a matter of speculation for me, a likely origin is suggested by prominent earlier (pre-1825) medical literature relating to the therapeutic use of cold water.
In 1805, the Scottish physician James Currie published an extensive review on the therapeutic use of cold and warm water in medicine. The work was titled Medical Reports, on the Effects of Water, Cold and Warm.
In Chapter 1 of his seminal work on the subject, Currie quotes a medical report by Dr. William Wright ("president of the College of Physicians, Edinburgh", op. cit., p. 1), another Scottish physician, on the treatment of fever with cold water ablutions (op. cit. pp. 3-4):
When upon deck, my pains were greatly mitigated, and the colder the air the better....
...three buckets full of salt water were then thrown at once upon me; the shock was great, but I felt immediate relief...the same febrile symptoms threatened a return, and I had again recourse to the same method as before, with the same good effect....
Sept. 10th...used the cold bath twice.
Sept. 11th...to prevent a relapse, I used the cold bath twice.
Wright goes on to describe the successful treatment of another patient with the same method.
Currie concludes the chapter thus (op. cit., p. 5):
To this interesting narrative, Dr. Wright adds some general observations on the traces that are to be found of the use of cold water internally and externally in fevers, in several works ancient and modern....
Having before experienced that Dr. Wright was a safe guide, I...determined on following his practice...I was further encouraged, by learning, that my respectable colleague, Dr. Brandreth, had employed cold water externally in some recent cases of fever with happy effects.
It is probable that Currie's influential work, itself based on the experiences and innovative practices of what might be called the Scottish medical contingent, prompted the French adoption of douche écossaise as the medical term of art for alternately warm and cold showers.