Yes that can work, however if one of the NGINX servers goes down, then the DNS wiil still send requests to the node that is down, and half of the requests will still not work.
The better solution (and what we are using) is to use Keepalived on the NGINX servers to have a VIP that is shared between the two servers. If the server that currently owns the VIP goes down, then the other server will assume the IP and continue working.
The keepalived solution (without using NGINX Plus and its keepalived-ha-module) works fine but active sessions get lost on master/backup failures. Usually not a big problem if a client is capable of repeating invocations…
Using pacemaker and corosync seems to be an option too.
Didn’t try yet but… maybe someone needs it.