Years ago I lost my boarding pass somewhere between check-in and security, went back to check-in and was given a replacement, no bother. However I wonder if today I lost my paper pass (not one on the phone) after security whether they could replace it at the gate? It would be quite a performance to leave departures, probably through passport control, back to check-in (probably closed) and back through security?
No need, the boarding pass can always be printed at the gate. While Ryanair charge for this, in practice they rarely do, and the charges will be officially dropped from November onwards. So yes, they can replace it at the gate if needs be, as (at most European airports anyway) they know who has scanned their boarding pass at security.
However if you simply have your phone and it dies; or gets lost, as your info is on an app even using someone else's phone (or maybe your own "spare older phone if you are carrying one) should do the job, get the app, log in with your email/password and all the info + ticket should be there?
So, with Ryanair's new system, the obligation is to have checked-in before you arrive at the airport. As long as you've done that, they'll print a boarding pass for you for free, it won't matter if your phone is broken or not, you'll just need your ID. It's a sensible way of doing things, as it completely removes the need for anyone to print their boarding passes before coming to the airport. The vast majority of passengers will just use the app, and if they can't use it for whatever reason, they can still get their boarding passes as long as they've checked in beforehand.
How long is reasonable though?
As long as it takes. It's not reasonable to expect passengers to be fined due to the failure of a system that requires internet access, and the courts are not going to agree with the railway if the passenger was experiencing internet connection difficulties through no fault of their own. It's actually where a prosecution would be problematic, because as long as the traveller was trying in good faith to obtain an internet connection, it's hard to see how they could be penalised if the app doesn't make the railcard available offline.
Having said all this, in this day and age, it really shouldn't be difficult for RPIs or otherwise to be able to see at a glance if a ticket has a valid railcard attached. If someone uses a digital railcard, then it should be perfectly possible to give your details to the RPI for them to pull up your digital railcard on their own devices.