I have sympathy with the lad involved, given the life-changing injuries he received. Whether or not he was in the wrong to be there (he undoubtedly was, and he almost certainly knew that he was), at the end of the day society is now going to have to provide support to an individual for the rest of his life, possibly amounting to £100,000s of lost wages, benefits needed, emotional losses to family etc.
Merely from a logical perspective I see that it is pointless to argue that people should fend for themselves, since it is society that has to deal with the consequences if fencing etc. is not properly installed and maintained.
In my view, the law is correct insofar as it attaches an obligation on occupiers to protect the general public, including trespassers, from harm. Given the significant loss to society and to individuals if this is not done properly, I do not object to attaching criminal liability (i.e. prosecution and a fine) to a failure to do this. In other words, I think that such a liability is plainly justifiable on public policy grounds.
However, where I disagree with the current position of the law is that I do not think the estates or families of trespassers, or the trespassers themselves, should be entitled to damages if they cause a self-inflicted injury. I think the bad PR, fine etc. that are associated with the prosecution that will no doubt result in most such cases, is enough disincentive to encourage occupiers to take reasonable precautions. It almost seems a sort of windfall that damages be awarded for a self-inflicted injury. Yes, undoubtedly the families and the individuals will come to great cost as a result, however unless there is some hidden danger (e.g. if no-one knew that overhead electrics were lethal, or the trains themselves were somehow electrified at 25kV), I do not see that you should recover any losses from what you have knowingly inflicted yourself.
In other words, I think society should be protected from having to deal with the aftermath of unprotected hazards. But individuals should not be compensated if they knowingly cause themselves injury.