If I may interject as a conductor. I follow similar sentiments already shared. If someone's railcard has expired by a day, or two, typically I'd let it go and remind them to renew.
If, however it's long expires I would report the ticket for investigation. If someone buys a ticket on Trainline and it says "Show Railcard" I don't typically ask for this unless they are travelling in a group with multiple tickets on one phone with a railcard attached.
I'll also show discretion to those that give credible excuses, but remind them that the next interaction won't be so lenient. I do however try to remain consistent in my approach with each train, if I've dealt with someone by the book, I'd do the same with the rest of the passengers in the same situation. I.e. checking railcards where I normally wouldn't.
In the cases that people forget their rail cards, I will report a ticket for not having a railcard present so these can be checked by the fraud investigations department of my TOC.
I also think the attitude test plays a big part in situations like this. I'm far less lenient with people who tend to show aggression or a bad attitude towards the advice I try to give.
I believe it's best to chalk this up to experience and move on, or take it to court, where you will almost certainly have higher costs and be worse off.