We don't know to what extant Voyager was trading or for what, no. But we do know there's stuff ships cannot replicate, the plot of both Phantasms and The Drumhead involved replacement parts the Enterprise had picked up from the manufacturer and had installed, rather than just doing it themselves.
Phantasms would be a poor example since it explicitly was referenced to being designed via a new technique, which lead to the problem in the first place, while I'm going to need a more specific reference to the episode "The Drumhead". The faulty dilithium chamber hatch which prompted the plot was installed in McKinley station if that's what your referring too but all that shows is that Starfleet uses Starbases for maintenance. That its more practical/efficient for them to to do so that way rather than being impossible for a starship to do so.
Neither of the above would require Voyager obtain spare parts solely through trade. So faced with the knowledge that we know they can replicate some things with a replicator both organic and inorganic and a lack of evidence they supported themselves primarily via Trade the logical assumption would be Voyager made their spare parts themselves for the most part.
Furthermore, there are some materials that can't be replicated (lithium), and it's also know that replicators are imprecise and leave flaws in the material produced (which may well be why warp core parts aren't replicated, it's not safe).
Where is it stated that replicator leaves "flaws" and how are we defining "flaws" in this context. Additionally were are we told that warp core parts aren't replicated at all? That would seem to contradict the vehicle replicator
@Sailor.X linked too.
You can't just remove a part and bolt another one on, no. But you can (probably) get most parts to work with a bit tinkering, and the engine will run well enough.
It would largely depend on the cars, the part in question and just how much tinkering you're talking about. From something that not only uses a shared principal but has a common origin on this planet. Now extrapolate that out to an entire alien tech base with different ideas of connection ports, voltage requirements ect and your car and jet engine would likely be closer in design/capability than that.
Well, that's not what I said they can't do. I said they can't roll up to a parts vendor and buy a new warp coil or a set of EPS conduits, because SW doesn't have those.
Imperial and Rebel tech doesn't use things called warp coils or EPS conduits, no. Whether or not they employ technologies and equipment that could be utilized for same purpose, with some tinkering, however is another matter entirely. I see no reason to broadly assume they couldn't as you have done.
Could they build so....maybe, though, some spare parts aren't going to be available because some materials don't exist in the SW galaxy. Not going to be finding any dilthium there, for example.
And do we have any specific information over what parts require what and what substitutions are possible? Or any detail to what degree, if any, this will impact ship functions?
Ok, so let's say you take an F-22 Raptor back to, let's be generous and say 1950, a mere 70 years. How easily are you going to be able to set up spare parts manufacturing?
Well we actually have a good example to work off of in the TOS episode "The City on the Edge of Forever". Spock, in a matter of weeks at most, managed to cobble an admittedly adhoc but functional computer using in part just what he could scrounge from 1930's US. Give him a team of starfleet engineers and a planet's resources at his disposal and he likely could do a whole lot more.
And since parts manufacturing is likely to be in this case just a big replicator anyway that would eliminate many of the secondary issues of resource allocation, refinement and then manufacturing to a finished product in sufficient scale, with the resultant necessary infrastructure that entails. All you'd have to do is custom build one set of the components for an industrial replicator, even if they're just cheap Chinese-copies compared to Starfleet standard, and then boom your in business. Shovel raw material and feed it power and it'll spit out what you need.
And that's assuming you know exactly how to do it, which is again generous. Even starfleet engineers are not experts in the underlying technologies for their ships (Booby Trap), and that's what you would expect.
I'm going to have to ask what you are specifically referring to from the "Booby Trap" episode.
Further a submariner likely couldn't build a nuclear reactor but he is not a starfleet officer nor would he have access to a starship database.