Here is my story and what resulted, whilst not identical, it does have common threads with this case.
I have a national concessionary bus pass issued by my local authority. Under a local agreement between the LA and local TOC, this permits half price travel within a defined area on the train companies network. My local station is manned part time and the ticket machines do not issue the 50% discount tickets as they are not programmed to do so. In addition, the former 'permit to travel' machines were removed and no such facility is available from the machines. Through work, (not in the rail industry) I happen to know the ticketing manager for the TOC and asked him what procedure I should follow to avoid having to pay full price for a ticket or risking a penalty fare. The advice I was given is this:
If you are unable to purchase a valid ticket for your journey or a permit to travel, you cannot be given a penalty fare or prosecuted provided you either a) purchase a child ticket for the journey (which equates to the correct fare) and present it to the ticket office at the destination for exchange for a correct ticket. b) Purchase a ticket for part of the journey and use this to exchange for a correct ticket at the destination or c) and this is the important one - travel without a ticket and purchase one at the first available opportunity, either from an on board ticket inspector or from the destination station.
The ticketing manager explained that where you are unable to purchase a valid ticket at your origin station, no offence is committed provided you purchase a ticket at the first suitable opportunity.
On one Saturday afternoon when the local ticket office was closed, I found the ticket machine to be not accepting card payments and unable to issue change. I therefore followed the advice given in C above. Whilst on board the train, a ticket inspector came round and when I explained the situation proceeded to issue a penalty notice for £20 plus the full cost of a ticket. He explained I could appeal to the address on the back of the penalty notice. I appealed and explained the situation (without informing the ticketing manager) and won my appeal. I was refunded the entire cost of the ticket, the penalty fare and given an additional amount in compensation.
So, based on my own experience, if you are telling the fuul truth about what happened believe you have a valid defence.