Something else was wrong, bad connections create resistance, resistance creates heat. It could have simply been a bad connection at that connector, or a failing pump. I noticed the terminal for the red wire is coming out of the connector. It's possible that happened before if the little "tab" wasn't locked in, and then the connection is bad, and then it melts stuff.
I have had a Walbro pump in the stock sending wiring for 12 years now, along with thousands of others running Walbros in stock senders, that combo works fine when the connections are good, it doesn't pull much amps. You may have had a faulty connector, hard to say. Its best to give the wires a little tug from the back before and after you connect them, to make sure they are still locked in.
If not, there is probably a little metal tab, you can tweak that out just enough it will snap in again in some cases, use caution and judgement, you don't want arcing in your fuel tank. There may not be enough oxygen in there, but you don't want to find out.