It isn't only a line, if it was, you would be correct in assuming the horizontal scan was working but not being deflected vertically.
The symptoms are: sometimes working normally, sometimes not working at all, sometimes there is a line travelling up or down the picture. It all points to the rectified mains AC not being stable enough and the excessive 100Hz ripple is sometimes enough to prevent the SMPS starting up at all or sometimes more than it's feedback loop can compensate for. As it seems to be a mechanical problem, the prime suspects are large components which tend to break their solder joints or in the case of a large capacitor, sometimes the tag connections on the capacitor itself. C507 is the reservoir capacitor after the bridge rectifier and also physically large and heavy so it has to be prime suspect.
Brian.