Yes, the bandwidth or rather sample rate of the soundcard will limit reproduction.The bandwidth of the audio interface applied determines the reproduction of your 5kHz square wave. Your measurements clearly show the lowpass filter function of the measuring equipment I think. Try 192 or even 384 kHz, with appropriate analog circuitry.
Here's a 5kHz square wave taken at soundcard sample rates of 48k, 88.2k, and 196k. (as high as my soundcard goes (rme baby pro.)



Okay, that's the best my soundcard can do with the output from a 25mHz signal generator
I don't think a driver rolling off a 10kHz can produce any kind of even halfway looking 5kHz square wave.