Getting back to the original question, here's
NRCoC▸ condition 20 (with my emphasis added)
20. Withdrawal of tickets
If you do not comply in a material way with any Condition that applies to the use
of a ticket, staff or agents of any Train Company may withdraw the ticket and you
will be given a receipt. In the case of an Electronic Ticket, this may require you to
either allow the staff or agent of the Train Company to delete the stored data, or
demonstrate to them that you have done so in accordance with the conditions of
use of that ticket.
So, whilst in this situation it was perfectly correct for the staff to withdraw the ticket for investigation, they were obliged to provide a receipt which it sounds like they failed to do.
As far as retaining tickets at barriered stations goes, I have never been refused (although there has occsionally been a brief discussion following which the barrier staff have backed down); I have always been allowed to retain my ticket (suitably cancelled if this did not happen on my journey).
I suspect you'd probably be OK with a receipt issued from a STAR machine (booking office window) for the taxman, as these are very detailed and record all the details of your journey, ticket type and even serial number. However, the Scheidt&Bachmann
TVMs▸ and
Avantix▸ receipts are much less detailed, generally just showing something like "Travel" and the value.