I have never done anything like what you are doing. But I have made many digital recordings of old tapes, like VHS. The following setting can have a huge impact on the quality of an old cassette.
It seems to me that the ideas here are the same.
There is a software layer in the form of the Sound cards driver that controls how the sounds collected from the line in or the microphone port are received and saved.
On the computer go to control panel and then find sound. In that window click on the Recording tab. Click properties. Here you will find a bunch of setting and controls that might help. Every sound card manufacturer has slightly different drivers to enable different features.
Some common features that might be causing you issue is the “Microphone Enhancement option” This runs the incoming data through a digital equalizer to try to get better sound. I would look to see if in your sound driver you can disable that.
There is also an amplifying program that normally runs by default call “microphone boost”. Again in your sound options I would see if there is a way to disable that.
There is also the “Listen level” in the driver. That controls how loudly the incoming stream is recorded at. I would set that low like 10% to start and see how that looks.
The sound driver can also split the sound cards resources across multiple programs. This allows the computer to play a movie and still make the e-mail sound. To allow the computer to play multiple sounds at once it must compress the sounds. I would look at the advanced tab and check the box that reads “Allow Applications to take exclusive control of this device.”