No reason epoxy shouldn't work if everything is perfectly clean. What is the part made out of? Steel, aluminum, stainless?
What about using epoxy to build up an area that can be drilled and tapped? Even if you get epoxy inside the nut you can run a tap through it.
I recently used JB Weld to attach a flat head screw to the back side of the stainless trim that goes on the radio grill. The original was a square head screw that was captured by being pressed into a square hole on the trim. The old one was rusted and I had to cut the nut off it.