Identification of filter component in sewing machine foot pedal
Something related to the VR1 slide-pot is the most likely culprit.
It may not be the slide pot directly, although those are notorious for getting "scratchy". However, that wouldn't likely cause sudden full speed operation.
I see that this is a single layer board. Most likely the solder joints of the slide pot pins on the back of the board have partially failed. This is common with single-sided boards and parts that take mechanical stress.
Single-sided boards don't have plated-thru holes, so the solder is only stuck to the board on the back side only in a ring around the pin. The pin sticks thru the blob of solder, which is also what holds the pin in place. These arrangements can develop hairline cracks in the solder such that the pin and a little solder around it becomes a free-moving "plug" inside the rest of the solder blob. It will make contact much of the time, but then sometimes intermittently not. That seems to be exactly what's happening with the pin for the low speed end of the pot travel. Without that pin connected, the voltage out of the pot is that for high speed, largely regardless of the pot setting.
The slide pot is probably mechanically linked to the foot pedal, and therefore gets regular stress. A single-sided board for mounting something like that is really the wrong tradeoff for everything except price. This thing was cheap in more ways than one. Single sided boards are cheap in high volume because they can be stamped instead of routed, for one thing. You may want to note the manufacturer and think carefully before buying anything from them again.
Reflow all the solder joints on the back of the board, and add a little fresh solder while you're at it. That should make it last another few years until you need to do that again.
Added
For completeness, VT1 is a 50 kΩ trimpot used as a rheostat (variable resistor). It looks like its purpose is to set minimum speed for when the slider is all the way at the slow end.
The 50K trimpot looks fine to me. It is a calibration adjustment, to adjust either the maximum or minimum speed (minimum, I would think).
I would think it's more likely VR1 (especially if something got into it) or something on the other PCB with the actual speed controller.
It looks like a trimpot, or miniature potentiometer.