Plug too loose, wrap it with a layer or two of black duct tape,
Plug too tight, sand/file/shave the plug to fit in fully
Cord too heavy: you need a place to attach a string/twistie/... and carry the cord’s weight. A string or twistie from a screw on the unit, or a nearby heavier unit. a small hook in the rack or windowsill or the wall behind, string tied from hook to cord. Think easy removal.
My Ortofon Phono cord is quite heavy, I support it’s weight via a hook just behind the plinth.
My Cayin power cord is heavy, but it is on a separate cabinet, I am able to simply push the cabinet back just enough that the cord is held in by pressure from the wall behind. I am able to position the amp anywhere front to back on the cabinet to make that work.