Do you know if there is an adaptor that will fit on the back where it plugs in to keep it more secure?
I don't think I really need the port replicator setup.
I don't know if the problem is the power cord.....
But any power cord problem will not occur just anywhere along the length of the cord. It will occur where it connects. To the wall or to the laptop. Wall is less likely.
I would remove the battery. Then boot up into the bios. Start wiggling the cord at the the two connection points and see what kills your laptop's power.