Well if they injure themselves then the owner is it at risk for liability, which can extend to include corporate manslaughter.
True, but the risk of a corporate manslaughter prosecution relates to whether they have taken reasonable steps to secure the site (consistent with the risk of trespass and the potential hazards on site).
Hence the case a few years ago at Bescot depot where DB Cargo where children broke in, one nearly died by electrocution. The site is high hazard (25kV, moving trains etc) and high trespass risk (there's lots of residential areas around the site). DB Cargo
knew that the site was insecure and
knew that people were wandering in and out (see below) but
did not do enough about it. It was the failure to take reasonable steps to secure the site that got them convicted (see ORR webpage linked below).
So if these trespassers have broken through the fence with power tools, or brought a ladder to scale it then the owner is probably OK. If they just wandered in then that's more of an issue.
DB Cargo (UK) Ltd has today been fined £1.2m, with £27,873.03 costs, after being convicted of one offence under the Health and Safety at Work Act.
www.orr.gov.uk
The ORR investigation revealed that DB Cargo was aware that members of the public were often gaining unauthorised access to the site, with 35 incidents documented between July 2012 and June 2017. On 28 May 2017, just a few days prior to the incident, DB Cargo recorded that several youths had been spotted clambering over locomotives.