Lucy helped me fix this 5
gallon bucket handle today.
It only took about 2 and a
half feet of rope and an extra hole next to where the wire handle would
fit into the protruding groove.
The rope should be thin
enough to fit through the old plastic handle twice. Loop it around on
one side and tie the ends together on the other.
I would go one step further, and cut a 5 inch piece of 1/2 or 1 inch PVC pipe, tread your new handle through it before you tie it up. The PVC feels much more comfortable on your hand when the bucket is full of whatever, and will keep the cord from cutting into your hand. Easy upgrade. Lasts forever and you can re-use the PVC when the bucket wears out.
There's a simpler way. Get thickest nylon rope which will fit , stick it thru hole on either and tie a knot.
Before that cut a piece of plastic soap bottle (Tide etc.)roll it into a spiral. Make it long enough so the rope ends don't hurt your hands.
Tape it and put a piece of plastic heat shrink tubing over it. Heat and shrink it with a heat gun.