Here's a crazy thought.
If all TVMs are connected these days, you could have a modern PTT that doesn't require any cash - but serves as a proof of where you boarded, and when.
It could print the station name, date and a code(s) that tell staff the status of machines/ticket office at the station.. thus telling a RPI if all TVMs were out of order, the ticket office was closed, whether TVMs were only able to take cards or whatever.
Should a passenger require a ticket that can't be obtained from a TVM, they could also get a permit (which could be printed at any time) before travel to do away with a lot of arguments later on.
With no cash involved, they'd not be at risk in the same way. The same modern PTT machine, obviously being connected, would itself be able to report when it is out of service so RPIs could easily verify, as well as the TOC knowing to go and fix it.
Backed up with posters/signs and an advertising campaign, you'd soon get everyone aware that if they enter a station without a ticket they must have a permit. I'd seek to have them issued at every station in the country!
With smartcards, the same machine could perhaps store the data that would be printed on a paper permit on the smartcard instead.