This concept is generally to be avoided because MongoDB uses client-side load balancing and primary-discovery within the driver tier: Basically the MongoDB driver powering your application will ask the MongoDB Atlas cluster what it believes its hostnames to be as well as which node is currently the Primary for taking writes. If you add a layer of indirection here this introduces risk: the driver will discovery the cluster’s identity and start using the cluster hostnames and you might not realize that you could be in a degraded availability state. Note for completeness that MongoDB Sharded clusters – where you connect through a set of mongos’s – are less susceptible to these issues.
Bottom line here is I highly recommend you keep it simple and use the built-in Atlas cluster hostnames.