@ blackcat....If you put it that way, I too would be at least a little apprehensive, but it depends on between which two borders I am crossing at night. True, very subjective , I know.
There are lots of people, families too, piling on the night trains and filling up the compartments. I would say 90% of the rides I've done by night train, where the general seating was in a six seat compartment (there are, like in anything else, pertaining to traveling pros and cons, and I am not even concerned about sleeping here), the compartment including myself had at least 4 people for most of the ride. That means, part of the entire ride, your compartment was a full house.
Still, no one had to surrender his/her passport, much less show it. My passport while on the night train stays in my right inside zipped up jacket pocket....quite secure.
In your case, I would still take the NJ night train to Vienna but would pick the general seating option (the passport stays secure on me), since I have no problems sleeping sitting upright anyway.
If you do decide on doing just that, you can bet that your seating compartment will have at least 3 others, if not a full house.