-
I have good experience with a rubber ice cube tray as a mould. Hardest thing will be keeping the USB port functional, might be best to cast the cable with it. My plan would be:
Find a properly sized latex mold, make a hole on both sides, thread through the cable and hope the hole is small enough to seal, fill with epoxy and cut the mold to pieces. Should be doable with any epoxy, can be bought at boat repair stores and the like.
Be sure to do a test run first, if you don't get the ratio right it won't harden and you'll be left with a charger trapped in sticky goo.
https://www.youtube.com/watch?v=h8ycmroFQSs