Interestingly, the legal structure around these substances apparently avoids banning consumption, limiting itself to banning the obtaining or possession of the substance. But it's worth noting that consumption itself is also prohibited, just without a firm textual basis. For example, if you give birth in a hospital, you will be tested for the presence of illegal drugs in your bloodstream (your consent is not required for this), and if you test positive, your child will be automatically confiscated.
I was more meaning a technological intervention that prevented underage people from being able to use/consume something.
Controlled substances are controlled through a legal framework although admittedly, some of the precursors to drugs are also banned which could count as a technological block on making them.
I have never heard of a confiscated child due to the parent having cannabis in their bloodstream - have you any source?
Interestingly, the legal structure around these substances apparently avoids banning consumption, limiting itself to banning the obtaining or possession of the substance. But it's worth noting that consumption itself is also prohibited, just without a firm textual basis. For example, if you give birth in a hospital, you will be tested for the presence of illegal drugs in your bloodstream (your consent is not required for this), and if you test positive, your child will be automatically confiscated.