The plastics used for consumer-grade 3D printing aren’t what I would call … robust … in any sense of the word. I sure as shit wouldn’t trust it to contain a explosion of gunpowder or the other internal mechanical gubbins.
There was an interesting article in Wired published back in 2015 about the author’s attempts to make a ghost gun. Outside of using an expensive CNC mill specialized for finishing lower receivers, the results were pretty disastrous when inspected by a gunsmith.