I lengthened the power cord of my old steam iron years ago by cutting off the plug on the cord & the socket of an extension lead, joining the two with a compact junction box wrapped in PVC tape.
Two days ago I needed the junction box to convert a fan heater to a longer power lead from an older dead heater. The junction box was mounted onto the base of the new heater.
I'm going to reconnect the leftover bits with an IEC male/female connector setup.