The fix concerned was for a friends plotter, so I don't know if it is still going.
I am not sure what causes these connectors to pop out. A knock, temp change?, but it seems a common problem. Once pushed back in I suspect they will last as long as they did originally. If it was an ongoing problem I think you could probably secure the connection a bit better with cable tie or similar.
Rather than throwing away electronics
that are uneconomic to repair professionally it is worth opening them up and taking a look. Even if you know nothing about electronics
you can pick bad solder joints and loose connectors just by looking carefully. The other tip is try pushing on components gently with a wooden (non conductive) match or skewer.
Only do this sort of thing if you are going to throw the unit away anyway and don't play around with units that can generate high voltages.