seek legal counsel for the custody concerns. be proactive.
i'm sorry for what you are going thru, but you sound like you have a very firm resolve.
IMO, a "stumble" might be coming across that one random leftover pill in the sock drawer and saying what the heck. but going to the extreme of shooting up can only be considered a relapse - as that took thought and planning and is that extreme end of drug use.
bless you for putting the children's best interests at the forefront. and for holding firm to your boundaries.