Ideally you’d have the same care put into making the “cheap” body. So that we can isolate the difference to just the material.
I also suspect that bridge placement makes a big difference in the amount of energy transfer that goes on. Electric guitars generally have the bridge near a node, so that limits the energy transfer somewhat. Basses have the bridge further back; partly that's due to ergonomics, but it also has the effect that more vibrations transfer to the body, which ought to reduce sustain. In a guitar you usually want more sustain, but in a bass too much can be a problem.
Nut material makes more of a difference on open strings, but in general a plastic nut is squishier and it absorbs more energy than something like bone, causing the note not to sustain as long. The saddle is the same way, but plastic saddles aren't typically used in electric guitar so it's not usually an issue.