In the US, there are no laws against surgical circumcision with informed consent (and I don't know of any such laws in any other country). Parents are generally allowed to grant surrogate informed consent. There is no requirement that circumcision be carried out by a licensed physician or other approved practitioner. A person can be held civilly liable for damage done by the procedure. There are no criminal prohibitions in the cases that you describe, but there could be civil interventions. In particular, the court could override parental consent – for instance, if a parent ordered circumcision of their 17 year old.

If some person does the circumcision without parental consent, that you be a crime. The key distinction is parental consent. The law grants parents the power to act on behalf of the child, under the premise that children do not have the capacity to act in their own best interest, and cannot reasonably be forced to bear the full consequences of their actions. Just as an adult can consent to a circumcision thereby negating any accusation of assault, so too can a parent consent on behalf of their child.