The only possible way I can think of to make this work is require the firmware to only be able to print G-code files that have a cryptographic signature from some central slicing authority that users submit models to, which then analyzes the STL file with AI or some shit for approval. The only technology that can remotely go "is this STL file a piece of a gun?" is machine learning. You're outright not going to get that done on the 3D printer locally; you'd have to increase the processing power of a 3D printer control board from "microcontroller" to "GPU" entirely for this dumbass tech. Maybe you'd run that on the user's PC but PCs aren't for sale to the public anymore so it will be done in the cloud.
It occurs to me that these initiatives are all popping up on the West coast where Microsoft, Google and OpenAI are based. The other day the CEO of Microsoft came out and said "We're going to have to figure out something for our bullshit tech to actually do before the unwashed masses riot." and what do you know, a couple states that are home to large AI firms start proposing legislation that can practically only be answered by AI out of the blue.