Best practices to fix a threaded nut inside a print I'm trying to connect two 3D printed parts (ABS) together with a threaded connection. Thus, I need to fix a threaded metal nut (M4) inside a corresponding slot which I've implemented in the design.

Right now I apply a conventional super glue on the nut and press it inside the print, wait for a couple of hours and then use it.

Problem is that the nut keeps falling out of the print when I apply a more tension to the bolt. Can you please advise me on how to make this method work. Maybe some of you aware of special glue for that purposes?
One good option would be to - if possible - change the design, so the nut is inserted from the opposite side, so that the bolt just pulls it in tighter rather than pulling it out.

Another option would be to instead of using a nut, use a brass threaded insert. These are like nuts, except they have ridges that are specifically aimed at locking it inside the plastic.