Don't keep it dark. Easy solution there. This is bro-science. 36hours of darkness has even been shown to reduce yield and potency. Light powers everything -- not just the visible growth you can recognize but the molecules being built that make up terpenes and thc and everything esle. Starving a plant of light is almost always going to be a net-negative no matter what the bro-science says. I'd say "always" but maybe there's some .00001% context where that is not true, lol. You can technically never be 100% certain of anything unless you lie to yourself about it.
At normal room temps, light is your biggest enemy to potency after you kill the plant. that has been verified in professional research, not anecdote or opinion. Light breaks down THC/THCA more than anything else, assuming you don't store it in 90F, lol, Some common sense needed. No idea where the breakeven is as far as rate of decay caused by light or heat being equal. The 90F is just a number out of the ether. Obviously some terpenes are more volatile than THCa/THC too, and gas off at temps in mid-to-upper 70s F. Even if you keep the environmenet perfect, whatever that is, those more volatile terpenes aren't going to last a long time, either way.
Darkness is good to dry in, it is not a myth. You should store and large amounts of weed in an opaque container or otherwise blocked from light. If you smoke it all within 2-3 months of harvest, i'd agree that it doesn't matter much, but any sort of longer-term storage you should consider light a very important factor to longevity of your buds. I grow weed for an entire year before i grow more. So, it needs to store for a year at high quality. It makes a difference. The faster you smoke a recent harvest, the less important this is. I have "blackout" curtains that don't actually black out the light, but it's a very dim environment during the day. Seems sufficient for 1 year of storage, maybe 1.5 years.