Had issue with exactly the same problem come through the workshop this week and it turned out to be a bad seated connection on the back of the LCD... Not something I would recommend as a test in any scenario really but try hitting the right hand side of the screen about halfway up (not with a hammer or blunt object of course), this might sound stupid but if by hitting it you see any flicker in video this might lead to it being a connection problem. As I am typing this I have just repaired a macbook invetor cable (data) by soldering in a new fine cable on pin one which wasnt giving me a connection with my multimeter. You gotta remember the invertor is resposible from changing a voltage from like 5V to like 70 thousand volts! Of course there is a very low current! But it's a big task I'm not surprised they conk out eventually especially considering where they live!
Doesn't seem to be getting overally hot. I haven't worked on many of the intel iMacs dont seem to have come through the workshop yet. But could be a faulty supply, does the videgraphics cut out or does the computer just shut down? Could be a faulty temperature sensor maybe?
I agree with mjuergens but if possible, it would be worth testing on an external monitor to ensure that this is actually the case. In the case that the line appears on the external monitor it could be a graphics chip issue which would mean a logicboard replacement or maybe a graphics chip "reflow". If not then you can replace just the LCD as per instructions on iFixit and source your LCD from the store or from somewhere like eBay. TIP: When mounting the LCD into the macbook top lid ensure you wear latex gloves.
So you basically have broken the ribbon cable from the keyboard to the logicboard of which power is on the same array? The only way to power it up without using the powerbutton would be to take the macbook apart and find the PWR BUTTON | | on the logicboard and short these two tiny connections together and it will boot. And then use a USB keyboard or something? You might think this is mental but as a "laptop" computer it is f*cked until you replace the keyboard anyway.