It's interesting that you cite the Toccata and Fugue in D minor because some theorists believe that was actually written much later. The original theory was that Mendelssohn wrote it in the 19th century, but I believe there were some sources from the 1700s. It clearly has a very non-Bach character, including the octave doublings in the chords you mention.
It's very clear that the man wrote chords. It's also very clear that harmony (ie vertical music theory) was not the tool used to write those chords. If you listen to BWV903, for example, there is a long section of arpeggiated chords that defy 18th and 19th century harmony.
The OP's idea of a tritone substitution from Scarlatti does not have the same harmonic function as a tritone substitution in modern music. I would agree with you that if the function matches, you can certainly analyze things in the context of a later theory, but the function does not match.
Finally, figured bass notates intervals, not chords. A crude realization can neglect voice leading in the upper voices, but more skilled realizers of figured bass will preserve voice leading between the intervals in the upper voices. The idea that figured bass is about chords sort of maps backwards the modern abuses of figured bass (which IMO should not be taught as a "basic music theory" subject - but that is for another day) onto the original method.