They could model this partially by making tanks from the stockpile a resource input on tank destroyer and other variants of that chassis. Basically, normal speed production if you don't have them, if you DO have them the production line producing stugs will take your unused variants and convert them, halving the production time (or something like that).
It would only draw from stockpiles, and only if the tank in question is no longer produced. Ideally there would be a button you could check for "convert this obsolete model" or something like that.
I made this observation in the form of a question here
Use equipment as input for the production might solve (in mod) also “the problem” of not stockpiling of resource by manufacturing fake equipment as "tungsten bar" or “barrels of petrol” to be used then, in case of shortage, as normal resources.