I'm not sure whether there's anything here that can help, but the first picture shows the 3-pin connector, with yellow going into 1, two blacks into 2 and red into 3 - all nice and tight.
The second picture shows the plug for the pedal, with the pedal cable coming in on the left and connecting its red to the first and its black to the second connector, and the mains cable coming in from the right, with its black connected to the first and its red to the third. (Counting connectors as 1 to 3 from the left.)
The wiring on the pedal plug isn't brilliant(as in the way its wired in, not the wires themselves, which are fine), and I will redo it, but I don't think anything looks as though it is touching anything it shouldn't. I'll let you know what happens when I have redone it - I may wait and get Mr Acorn to do it on the basis that he can tighten things better than I can!