It depends. They are surely not made in the same factory, as Apple gets their parts from all kinds of different manufacturers and has their own assembly lines. But sometimes, parts that fail the quality check don't get destroyed and end up in some other sources. Like the OEM watch bands or protective cases you can buy from China without packaging. They are real Apple watch bands and real phone cases, with logo, CE print and everything, but they have no packaging and small imperfections. What do you think how did they get these? They disappeared from the bin that failed the quality control.
Also, overshoot production. You can get OEM parts from the iPhone or the Apple watch in China on the markets. These are often overshoots. Of course they SHOULD never appear to be sold to other customers than Apple but they are.
So with the Airpod clones - they get assembled in China, do you really think it would be a problem to source some manufacturers that can deliver close copies? They real problem so far has been the software technique. You can assemble an Airpod but you can't make it an Airpod without software integration. They are currently spoofing the mac adress of the originals to allow some interesting functionality, but they have not real H1 chips. And they most probably never will, because THIS is what Apple carefully guards. Still, it's pretty impressive what you can get for 20 bucks, if you get the most recent model (which is NOT the i12). I had very low expectations and ordered them as a joke to laugh about with my friends. However, they are pretty solid, solid enough for me to question how much $$$$ Apple banks with the originals.