So that leads me to think, does the wood and other non magnetic factors of the build of the guitar affect the tone, the sustain, or both?
And if I had identical strats, with everything adjusted the same except one made out basswood and one made out of swamp ash, would the average listener be able to hear a difference?
Not trying to be argumentative, just trying to understand.
To answer your first question briefly - both.
The second question - maybe. Too many variables, starting with the "average listener". The amp used, the volume, the room all could be factors as well.
Both can be affected. Let's start with wood. You've heard a marimba, typically the maker will try to use wood from a single tree and as close in proximity as possible. Yet every note is different, why? They are all different lengths so they resonate at different frequencies. If you could go to a shop that made guitar bodies, hang them up and knock them with your knuckles, you would hear that some of these bodies "ring", some "thump" and some "thud" depending on the type of wood used and the actual piece of wood itself. Now, if you have two very similar woods that "ring", the note you'll hear from a P-Bass body, a Strat body and a Tele body will be different. Why? They are all different lengths. A body that rings on a G note will absorb more energy from strings that are played at a G note then they will at a Bb. That affects both tone and sustain, a frequency has been attenuated.
Now, you have a Les Paul with a lightweight mahogany neck and the tuners are also the lighter "vintage" style. You replace them with a nice hefty set of Schaller tuners. The increased mass of the headstock reduces the resonance and increases sustain. The tone changes with the increased sustain, the strings are not robbed of energy by the headstock.
I could say more or less the same thing about every single part of the guitar. Even the pickups, some of the vintage Gretsch pickups were very "microphonic", a frequency from the speaker would cause a part of the winding or magnet structure to resonate and "squeal." Some players seek microphonic pickups, I've seen it said that they "sound better', whatever that means. If you "pot" that same pickup using wax or crazy glue or whatever, the sound of that pickup will change.
The variations are endless. Long ago and far away I spent a considerable time one day trying out a dozen brand new Gibson Les Pauls. I didn't really care for any of them but some of them sounded like a wet log and others had more sustain and clarity. I didn't analyze them to figure out why but they were quite different. There could be many reasons for it.
I had a 1965 Martin D-18 in good condition. It played well. It sounded pretty OK but not what such guitars are reputed to be like. I sold it to my brother because he wanted it. Decades later he sent it to me and I sold it to somebody else, he didn't like it much and never played it. I've played other Martins from that era that sounded amazing, many times. Outwardly it didn't look any different. It had a fair amount of wear and tear so somebody played it enough for it to be broken in (yes, wooden acoustic guitars typically sound better after they've been played for about a year or so).
And it doesn't stop there. Think all electronics are identical? Guess again!!!! Unless the specifications of the parts are within very tight tolerances (odds are they mostly aren't), then one keyboard could sound better than another identical one. They may sound so close it cannot be noticed or they may both sound good so nobody cares.
The output transformer of a tube guitar amp also goes through a break in period. Coils with current flowing through them wrapped around ferrous metal laminations creates what? Magnetism!!!! It may be a cumulative effect but it happens.
So yeah, consistency is an illusion. Choose what sounds good to you and go with it, that's the bottom line.