A crucial part is the contract wording regarding what exactly was sold when NEWAG sold the trains to the operator - namely, the documentation for maintenance and repair was supposed to be complete. As in, should NEWAG encounter a critical existence failure, it should still be possible for a third party to service the trains so long as parts could be acquired, and in worst case, start working on replacement parts.
With most other right-to-repair cases there's way less recourse. With trains in Europe you have legal rules that disallow hiding critical maintenance data behind trade secrets, for example.