What, however can I do if I find myself on such a regional train with a good ticket that is however not validated? (*)
Can I search for the train attendant and ask him to validate it for me? To what lengths do I need to go in this case (think about moving in a packed train with large luggage
Can I just write down time and station of departure on the ticket (since in the end that is what the validation machine does)?
(*) I know this situation is best avoided from the beginning but we have all seen validation machines that do not work, especially so for paper tickets from kiosk booths or been running for the last train of the day with the last thing on our mind the validation of the ticket. Or I could be that traveler that just arrived to Italy and learns about the validation thingy only through the announcement on the train that has already departed.
It's quite common for none of the validation machines to be working. Officially, you must seek out the train conductor immediately upon boarding and have your ticket validated. It isn't sufficient to write on the ticket yourself.
Convalida - I biglietti devono essere convalidati prima della partenza
del treno utilizzato nella località d’inizio del viaggio mediante le
validatrici. In caso di mancanza o non funzionamento di tutte le
validatrici di stazione il viaggiatore deve richiedere la convalida
dei biglietti presso la biglietteria oppure, in caso di mancanza o
chiusura di biglietteria, deve rivolgersi di propria iniziativa al
personale di bordo all’atto della salita in treno.
The official wording says that you're really only allowed to do this if the machines are missing or not working and the ticket office was closed or missing too, since you should've attempted to get the ticket validated at the ticket office if the machines are broken.