As long as the Union in question can demonstrate that they used "reasonable steps" to comply with the legal requirements then they would be protected from having legal action taken against them. "Reasonable steps" is undefined in legislation but a code of practice has been issued by the DfT with further guidance:
www.gov.uk
The code of practice points out that not doing the above does not necessarily mean that a Union has failed to take "reasonable steps" but that these are the suggested steps to ensure it is legally compliant. It does also point out that the Union doesn't have to ensure that the specified service is delivered simply that it has taken the "reasonable steps" to comply:
But, presuming that a Union does take reasonable steps, then if staff failed to turn up to work anyway then the Union would be safe from successful legal action as long as it could demonstrate to a court that it had taken "reasonable steps".
As for TOCs I can't see any particular mechanism by which action can be taken against a TOC which has issued Work Notices. Indeed this position is confirmed in the guidance to the regulations:
Information about applying the Strikes (Minimum Service Levels: Passenger Railway Services) Regulations 2023 in practice.
www.gov.uk
Fundamentally, if the Union has taken its "reasonable steps" then it would fall upon the shoulders of the individual members to face the consequences of failing to attend work when required to do so. Whatever the usual procedures that are in place for dealing with that at that specific employer would apply. To my understanding.