Is it safe to have Mongo replicas on single server?
Replication is a risk mitigation strategy, amongst other purposes. If you understand those risks, and the consequences should they eventuate, and that's all acceptable in your context then by all means run multiple replicas on the same hardware.
For a dev environment I can imagine this would be OK. A hardware failure would affect one person only. Recovery is likely quick. Replication can be tested at minimal cost.
For production, however, it would be much riskier. Hardware failure brings down the whole service. Recovery requires more, and more invasive, intervention. Resuming normal service may take longer and violate RTO.
My reading of the paragraph quoted in the question is that performance will not be affected by having multiple processes on the the same VM host, as long as those VMs are appropriately configured. I don't read it as a recommendation but as &quot;you can do it this way if you like at it won't necessarily break.&quot; My point is that an application architect should also consider availability. That is covered in a separate paragraph

For availability, multiple members of the same replica set should not be co-located on the same physical hardware.