C-H,
Not being very familiar with railroading in your country, I can only relate what I know about it in this country.
the "american" term for the funny thingy on top, is a pantograph. Some of them have ice breakers on them for just the situation that you are describing. The arcs you see are the result of the pantograph being pushed off of the wire by the ice, electrically it probably isn't all that much of a big deal. It is of such short duration, the voltage and current being what it is, it just puts on a cool light show.

If a derailment brings the wire down it means that the pantograph is hooking over the wire. The contact shoe on US loco's are fairly wide, so to hook over the top of the wire the loco needs to rock pretty hard as it's coming to its unplanned stop. If my memory serves, European loco's shoes are much narrower, meaning that if the loco rocks to the side and then straigtens up it can hook over the top of the wire then catch on a support wire, and bring the whole thing down on your head.
A derailment is usually pretty catastrophic, especially at speed, it's a wonder that any of the equipment even stays upright. Now imagine trying to put 1.5 million pounds back on the rail. That's how much the biggest steam engines weigh.

TW