Sounds like a reasonable solution in theory.
In theory, yes; but when you try to put it into play, you will have religious parents suing on account of their children being tortured in hell or some such crap on account of being allowed to live. Then you get into that whole "separation of church and state" thing again; you have to define it
over and
over again to those modern bigots who demand their views made into law.