The attic should have a more stable temp than the garage imo. The shade of solar panels should work for you in the summer, the household heat helping in the winter by keeping a constant temp.
The concrete with no ceiling makes our garage nearly as damp a basement too.
Fast temp changes are another enemy; in as with large temp swings(esp,fall/spring) the cooler than air metal gets yet another opportunity to collect condensate each time the air temp rises quickly. This happens in my garage via windows catching the morning sun. The air around the length of a light beam warms in seconds; so metal items near those beams see warm air and rust fast.
I've had track stored in both places for decades (25-30ish years). They were really in about equal shape; but the indoor "trapdoor" attic won by a few rust pox marks here and there on the garage track. The garage track was NOT near the sunny areas at all.
Stored in black garbage bags, with boxes or wood (2x4 scraps maybe 2ft worth). (a block of wood in the toolbox is an old machinist trick, it will help keep a steadier humidity, absorbing dampness quick, and releasing slowly, only as the air dries a lot and lets it... an old school version of "dry pack" envelopes of silicon)
Which roof is newer might be a better question. 🤔
I don't like to freeze my electronics unless it's to reduce resistance or stop them overheating Again, moisture is bad and condensate around freezing more likely.. Semi-cold is ok; 40s&50s fine, low humidity. Most substances like to be at about 40- 50° to last long it seems (?)