We use APC racks, UPSes, and PDUs. UPSes are hard-wired. Connection from the UPS to the PDU is with a twist-lock cord (L5-20 or L5-30).
For the last hop of the power connection (C13-C14, which seems to be what you are asking about), we use these special locking power cords from APC.
They positively "snap" into the socket, so they can't accidentally pop
out of the PDU.
On the server/device side, the cords have a little "bump" that
provides some friction to hold the cord in the socket. Not a
positive lock, but it still helps.
If your power infrastructure is APC, I highly recommend them.
Note that you only see the benefit using the APC cords with an APC PDU. The APC PDU still accepts normal power cords.
Also, wherever possible, we try to use some form of strain relief on the server/device side. See if you can Zip tie power cords against the back of the server so they are not taut.
Other things you should be doing:
Redundant power feeds on any device that supports it. Most servers and critical devices should have 2 power cords, each going to a separate PDU. (Plugging them into the same PDU won't help you when the PDU fails, or you unplug it accidentally.)
For devices that do not redundant power supplies (network switches), you should have redundant devices. Each device should be plugged into a different PDU.
If you are using the dual PDU approach, make sure each PDU is <50% loaded so it won't trip when the partner PDU gets unplugged accidentally. (Metered PDUs are helpful here.)
Ideally each PDU should be connected to a separate UPS. UPSes can and do fail. People also accidentally turn off a UPS. Again, make sure each UPS is sized to handle the load if its partner goes offline.
If two UPSes is not feasible for your facility (due to size, cost, etc), at a minimum you should be using UPS with redundant power modules and batteries.
You can take the power redundancy a even further. If you have dual UPSes, you can have two power feeds into your building (from two separate power companies). Generators of course!