Say, I have a paper written up. I wish to publish it in a reputed journal without submitting it to arXiv. The first journal(A) I submit it to rejects it. I send the paper to a 2nd journal (B) for submission. At the same time, some other group submits a paper to another journal (C) and it gets published there. Is there any way to avoid this problem without using arXiv?
You could pre-register your study (e.g. on OSF: Open Science Framework), attach your paper draft to it, and add a temporal embargo on the pre-registration (OSF allows for this option).
That way, the pre-registration (including the paper draft) is saved with a timestamp, but invisible to the public until a pre-specified date or until you choose to end the embargo earlier than the pre-specified date (e.g. after paper acceptance or publication - see: End an Embargo Early).