ECG wave names origin
Interesting question! I searched briefly and came up with an answer from this short paper.

I won't repeat all the details of the paper, but to be not a completely link-only answer I will give a brief summary:

The technology used at the time was a lot different than modern ECG leads: it used a Lippman capillary electrometer that used moving mercury to detect brief current changes.

With this relatively primitive device, there were 4 apparent features in the trace, which were named A B C D (earlier, a different physiologist saw only two ventricular features that he logically named V1 and V2).

However, it was known that this primitive measurement was not showing the actual electrical signal, but rather a filtered version due to the physics of the mercury in the tube, which was subject to inertia and friction. When a physiologist used mathematics to essentially "deconvolve" the filtered signal to get the original signal back, he plotted both curves next to each other: one labeled A B C D, the other labeled P Q R S T (note that in this deconvolved version of the trace, there were 5 components rather than 4).

As for the choice of P Q R S T, the source I reference notes that these were the letters commonly used by Descartes, and since then have been commonly used to refer to series of variables when one needs to distinguish between ABCD, XYZ, etc.

Later measurements that directly displayed the 5-component PQRST wave continued to use that terminology.



Original: Einthoven W. Ueber die Form des menschlichen electrocardiogramms. Arch Gesamte Physiol.. 1895;60:101–123.
Reproduced in: Hurst, 1998



References:

Hurst, J. W. (1998). Naming of the waves in the ECG, with a brief account of their genesis. Circulation, 98(18), 1937-1942.