I have a Maximus IX Code and I'm having trouble understanding what you are looking at for what you are calling the "primary" M.2 slot.
The M.2_2 slot is at the very bottom of my board, and it uses the vertical adapter that stands it up like a "rocket." This is out in the open air, so yes, it gets passively cooled by other things going on in your case, for me, it primarily gets cooled by the front fans blowing in toward it. I have my system stick on this one, a Samsung 960 Pro 512GB NVMe.
The M.2_1 slot is horizontal and hidden by a section of plastic "armor." So it is shielded from a lot of air flow, but teh "armor" is not air tight, and it does have slots, or "vents" cut in it to allow for some air flow. I have a storage stick on this one, a Samsung 960 EVO 1TB NVMe.
I don't have heat problems with either one, but i do have a well ventilated case. However, I wouldn't worry about it anyway, as these M.2 drives are used in laptops with virtually no ventilation at all and they seem to work just fine from everything I have read.