The NEOII IDG is fairly clear about how some plain text components of a PAN can be obtained for contactless EMV cards by associating a DFEE1D value with a given AID via group ids. However, given that there is no AID involved in the magstripe only transaction, how the masked data output returned by the 02-40 command, can be controlled for magstripe transactions.
The DFEE1D is the tag to define the mask data output. You just need to put the DFEE1D to group 0 and it will apply to all MSR, contact, and contactless transactions. It doesn't have to be put in each AID group.
Refer to the ID TECH Tag Reference Guide for detail about the DFEE1D tag.