there are labs in mexico that basically replaced the facilities that used to refine locally grown opium into black tar. fentanyl precursors are extremely easy to acquire by an organization. they were originally coming from gray market chinese labs (the CPC cracked down hard) now likely from india which has a well developed pharm chemical industry
i wouldn't be suprised if some synthesis was happening in the U.S. also there was a period where tons of analogs were being manufactured and sold on the darkweb mostly to research chemical enthusiasts. so there could still be stockpiles of these analogs being fed into the "heroin" supply. i have no doubt these original RCs were being added to low quality heroin which basically started this whole nightmare.
so in a sense it did originally come from inside the house. then capitalism came and did it's thing