There is a long thread in this forum, discussing ultra low distortion audio range oscillators. It is mentioned in some posts that one purpose of an ultra low audio-range oscillator would be to be used in a distortion analyser bench top instrument.

I have no experience on the subject but I have bought a digital scope which made me think. The digital scope samples the incoming wave and records the amplitude of the wave over time. Surely then it is simply a matter of comparing these sample points to their mathematically sinusoidal equivalent, ie you do not need a perfect oscillator to make a comparison, you can simply derive the theoretical point on the curve mathematically. I am sure my scope can export tables of data so then I could do that in Excel, even if my scope does not offer a "THD" function out of the box (which I am very puzzled if it does and if not, then why not!).

There is a long thread in this forum, discussing ultra low distortion audio range oscillators. It is mentioned in some posts that one purpose of an ultra low audio-range oscillator would be to be used in a distortion analyser bench top instrument.

I have no experience on the subject but I have bought a digital scope which made me think. The digital scope samples the incoming wave and records the amplitude of the wave over time. Surely then it is simply a matter of comparing these sample points to their mathematically sinusoidal equivalent, ie you do not need a perfect oscillator to make a comparison, you can simply derive the theoretical point on the curve mathematically.

Think about that carefully... compare what to what? So you are thinking that the scope can capture the waveform from the DUT (an amp or whatever) and compare the waveform to "perfect" sine to determine THD? Where does the waveform from the amp come from in the first place? You need an oscillator, as close to perfect (low distortion) as possible, to source the signal that will go through the DUT. If the oscillator is clean enough, then the distortion measured is essentially all contributed by the DUT.

On the measuring end, there are a couple ways to do it, you can examine the spectra of the signal using FFT or a specturm analyzer (essentially a swept bandpass filter), and/or you can pass the signal through a notch filter to remove "all" of the fundamental, leaving only distortion and noise, and measure/observe that.

I guess in theory yes but in practice no.
An Oscilloscope Analog to Digital converter has a fast sampling rate but a low resolution, typically 8 bit.
The FFT functions that they offer is limited by the Analog to Digtal Converter resolution.
I guess that a sound card could be used but identifying whether the distortion came from the source or was caused by the unit under test seems difficult.