Normally, best thing to do is NOT selling all the scrap but just enough to meet quata. I feel like this doesn't accomplish anything in the game other than making you hoard scrap on ship.
I don't know if it's possible but maybe a way to add your oversell value to the next quata? For example, if you have 150 dollar quata, and you sell stuff for 200 dollars, you start the next quata like this > 50/300 or something.
but if it isn't understandable I can try to reword