I tried connecting the computers directly with a cable and get the same results.
Yeah, I wasn't 100% sure if it'd change anything. But still, its good to at least remove the switch as a potential issue. Now we know that its either the cable, the NIC, the motherboard, or the CPU. I don't know if we can make your test setup any simpler, so this is as "easy" as it will ever get.
The CPU / Motherboard could be an old version of DMI which may have less bandwidth than you expect. Motherboard -> CPU connections are surprisingly complicated. Your CPU's "high bandwidth" direct-PCIe x16 port is probably taken up by your GPU. The remaining x4 or x1 ports may have less bandwidth than you expect.
The NIC could be the issue. You're pretty much in charge of quality control yourself when buying used.
I doubt its the cable, given how short your cable is already. (The shorter the cable, the easier it is to send a high quality signal). But its still worth swapping cables just in case.