Absolutely 100% incorrect. If the parents aren't willing or able to raise their children, someone has to. "Throw them away" is not a moral, ethical, or utilitarian answer.
At least from a purely utilitarian point of view, cost of educating and raising a child is exorbitant (teachers, food, clothing, shelter, etc) compared to euthanizing them (1 to 5 bullets, executioner pay, and burial costs). Benefits are going to be somewhat iffy; yes they could turn out okay but it's just as likely they could turn into criminal offenders that will chew up resources of the criminal justice system which is quite a lot more expensive.
I will emphasize that this is strictly from a utilitarian point of view. I make no comments on the moral, ethical, and legal issues.
I think you missed the "imprison them for 2 decades" part of euthanizing them in your consideration. It's fun to just make up how you think things should ideally work, but we're bounded by how things actually work.