Every shift wears the transmission. Keep doing it and maybe you lose "D". Don't forget that it'll wear out your shifter and linkages, and if fully electronic, range sensors electronic switches.....
Just leave it in drive. If you worry about temperature, install an ATF gauge and monitor the temp. Prove there is a temp problem and then add an ATF cooler to address it. I've never seen a transmission heat up excessively at a red light or drivthru.
Now open up your factory service manual, or specific transmission manual, and see what is engaged and disengaged every time you shift from N to D or D to N.
For every fools folly, there is a transmission shop waiting for your business.