Long post sorry.
I am unclear as to what happened on the day of the hearing, and therefore as to the basis on which the proceedings were disposed.
It appears that a summons was served upon you and that as a consequence you sought professional assistance. I cannot tell whether you sought advice only, or representation in the proceedings.
If you consulted a solicitor then you should have received a client care letter. Costs in criminal proceedings are not an area in which I have any expertise, but it would appear that, in order to preserve your opportunity to recover costs in the event of the prosecution failing (as it did), the client care letter should have included guidance about funding options for the proceedings and should have drawn to your attention the need to apply for legal aid. There is Law Society guidance to this effect.
My understanding is that, irrespective of whether you would have been financially eligible for legal aid to defend the proceedings, you should have applied for it. It appears that this is a pre-requisite of being able to make application for an order that part of your legal costs are to be paid by the prosecutor following your acquittal.
It appears, furthermore, that the costs recoverable by you as a successful defendant in criminal proceedings are subject to a cap, in that the amount recoverable will be no more than the amount payable under specified legal aid rates, irrespective of whether you received representation as a legally aided or as a private fee-paying client. Legal aid costs can be expected to be significantly less than charges made to a private fee-paying client.
This seems to have been a wholly unmeritorious prosecution, a conclusion supported by the fact that it was one with which the prosecutor was not prepared to proceed. Nevertheless that prosecutor may, apparently, have allowed it to get as far as a trial (a not guilty plea having previously been entered). I imagine that in consequence, and on the assumption you engaged professional representation, your lawyer made preparations for trial on a contested basis, possibly at significant expense to you. I fear that, due to the restrictive regime applying to successful defendants costs, you may not recover that expense in full from the prosecutor, even if all the conditions for a successful costs application have been satisfied.
This is very much at variance with the civil costs regime with which I am more familiar. In civil proceedings, the Court can signify its disapproval of unreasonable conduct by one of the parties to proceedings by making an award of indemnity costs to that partys opponent. A significant feature of an award of costs on the indemnity basis is that the onus lies on the party having to pay the costs to show that the sums being claimed by the receiving party are unreasonable, as distinct from the standard basis, in which the receiver has to show that the costs claimed are reasonable. Had this been dealt with as a civil law claim, you might well have found yourself strongly placed to recover legal costs from the train company on the indemnity basis.
In the context of what was, essentially, a commercial transaction between you and the train company in which the criminal law should arguably have no place, the outcome of being able to recover only a capped sum in costs, let alone recovery on an indemnity basis, would be thoroughly unsatisfactory.
At the very least I also think wider publicity should be given to the train companys observation that you should record in writing your ticket buying conversations.