This site is very helpful for individual parts for Gen 2 & 3 and you can search around for even more info, but nothing for Gen 1 on it.
To start at the beginning you can tell the difference on these points.
Gen 1 has Green lighs on the left side of the battery on the Frame.
Gen 2 has a TCO on the top of the Frame with lights on it.
Gen 3 Comps etc, have the same TCU, but the battery connector is different. Gen 3 has a little...
There is a very think spacer that goes on the axle and it looks like it is part of the axle. It may be missing or in your XD driver you took off. I just went thru this with a bike and it sounds like it. Its about 3/4 long and very thin and goes inside the XD driver
A very common issue is the Steering stem bearing, but it is more of a Creak than a rattle. It happens when you pedal and or hit bumps, you may want to take the steering stem apart and grease good since you have most other things.
Also check motors bolts especially the left handed threaded one...
I can tell you from experience you never know. We have hd brand new bikes with a bad motor and some with over 3000 on a motor and still running good. But what I can say they are getting better and better and we replace them less and less often. If you every need direct help reach out to us...