"is it safe?" Depends on how well one can fabricate. I always get a bit of a smile when I read this type of question. The folder's stem was made by someone's hands and it's proven to be safe. many of us here have made their own (and their stoker's) stems and not have had failures. So to paraphrase an old slogan "only you can prevent unsafety".
There have been a few stem kits that builder suppliers sold BT (before threadless). Basically what grumpus described but without the added wall at the wedge cut or at the quill's top either. The handful of self made stems I've done didn't have any issues with a single walled quill but I did choose fairly thick walls (.058" IIRC for the quill). here's a shot of our tandem that has both stems made by me (as well as a custom brake cable hanger and some of the rerouted cable stops). The bar clamp uses M5 bolts in binder barrels patterned after the common M6, but down sized by about 80% (and I still have some of these binder barrels available). The two bolts have held the bars quite well.
If you do try to make your own stem (or mod an existing one) take care with the alignment. With bars that have a 20"+ width any slight misalignment will be greatly magnified at the grips. Tacking and checking will be your friend. Andy