When a stud gets loose, I take it out,and use a file or grinder to flatten the threads on two sides. They can be on the opposite side or at, ie, 90 degrees.
then I take a small drill-bit and drill the hole slightly from the side, to enlarge part of the whole, on the inside.
THEN, put as much epoxy as possible into the hole.
If the stud has a nut on the inside of the stock, epoxy can be put on the threads, then some put through the nut. If you can come through the bed-side, fill the hole with epoxy...short of the barrel-line.
I have used JB Weld, Micro-Bed and at least 1/2 dozen other epoxies, and all have worked just fine.
I never wanted the stud out, afterwards, so can't speak to that, but I wanted to be able to use the sling, as a "hasty-sling," and I have been able to do that. This works wih wood, or plastic and fine-thread or wood-screw thread,
Have fun,
Gene