Reality Of Food Waste
I am not certain about the authenticity of this hadith. Nevertheless, even if such a statement has indeed been correctly attributed to the Prophet (sws), it would pertain to the intentional wastage of food—for which one would be held accountable. This does not apply to genuine situations, such as the one you mentioned, where the upbringing of a child naturally involves minor and unavoidable wastages. In such cases, food that cannot be consumed in a hygienic manner may be disposed of. What must be avoided, however, is deliberate and excessive wastage of food.