Do you have sufficient proof to show in court that you developed it and wrote it prior? I view an NDA as one more layer of proof that it's yours in that battle
I do not think you know how the scientific peer review process works. The manuscript will generally get sent to the editor of the journal through their submission system, with the corresponding electronic trail. Most manuscripts are also written with coauthors who can attest to their own personal contribution.
While I admit I don't I can't say that trust in a system that leverages trust in peers is a valid excuse for being passive bystanders when more concrete actions should be taken to prevent further damages.
There's about a thousand different ways the authors could prove they did the work. Many are listed in the actual post. Unless you did all the work yourself, didn't apply for a grant for it, kept all your work quiet from your colleagues and institution, didn't hire anyone for the project, didn't request materials from your institution, didn't have coauthors, sent it to an editor with a bad memory, didn't use the proper submission system, didn't back the files up and lost your computer, didn't send preprints to any of your friends or colleagues, and the editor reviewed it themselves without sending it to anyone else, you aren't going to have the slightest difficulty proving it is your own work. On the flip side, the plagiarist isn't going to be able to do any of that.