Maybe something like:
"numerus vitiosus factus" or "numerus vitiose factus"
"a defective quantity having been made" or "a quantity having been made defectively"
It appears that the word "factus" alone can imply a made quantity- at least in the case of olive oil production, so one could potentially even drop the "numerus", but it would be necessary to see more examples to determine if this is a valid usage in general.
premi plus quam centenos modios non probant: factus vocatur; quod vero post molam primum expressum est, flos. factus tres gemino foro a quaternis hominibus nocte et die premi iustum est.
It is recommended, that not more than one hundred modii should be pressed at one time: the name given to this quantity is "factus," while the oil that flows out at the first pressure is called the "flos." Four men, working at two presses day and night, ought to be able to press out three factuses of olives.
-Pliny the Elder, The Natural History, Book 15, Chapter 6
In any case, using "numerus factus" seems like a reasonable way to refer to a "batch" of something.
Considering the word "bad" in the sense of "defective", there is an example of the word "vitiosus" being used to describe a bad product in the context of brick making:
Ducendi autem sunt per vernum tempus et autumnale, ut uno tenore siccescant. qui enim per solstitium parantur, ideo vitiosi fiunt, quod, summum corium sol acriter cum praecoquit, efficit, ut videatur aridum, interior autem sit non siccus; et cum postea siccescendo se contrahit, perrumpit ea, quae erant arida.
Bricks should be made in Spring or Autumn, so that they may dry uniformly. Those made in Summer are defective, because the fierce heat of the sun bakes their surface and makes the brick seem dry while inside it is not dry.
-Vitruvius Pollio, The Ten Books on Architecture, Book 2, Chapter 3