Attics get surprisingly hot baking in the sun.
Much more so than most people would assume. The heat kind of gets trapped in there, especially if you like most people - have a black roof, poor/no ventilation and all of your insulation in the attic floor to insulate the living spaces below It’s worse than a sauna in some cases.
I haven’t checked on a cAP ax but I used to run a CSS-326-24G-2S+RM switch in my attic (in an IKEA Lack Rack) for a while.

I can’t remember the exact numbers, but without additional airflow it definitely ran much hotter than I was comfortable with in the summer heat.
I wound up suspending a big box fan from the rafters using bungee cords (to isolate vibration noise) blowing straight at it. From the factory, the CSS-326-24G-2S+RM does not have a fan installed in it, but there is a fan slot on the case, I popped a 5V 40mm fan in there and powered it using an old USB charger, to get some extra air moving through it.
With these precautions I was able to keep both the switch and the 10gig fiberoptic transceiver within readonable temperatures. There is no way I could have used the hot running 10gig copper S+RJ10 SFP+ adapter up there though, regardless of airflow.
I think that if you are creative, keep an eye on temps and add some form of forced air you can make it work.
Even with these precautions it may wind up accelerating the aging process of the unit a little bit, but these things last so far beyond their useful lives anyway that I don’t think this is an issue.
That said, you won’t know until you try.
In my case the switch is still going strong 3 years later. It was up there for about 14 months until I moved to a new house. I no longer have the need for any networking equipment in the attic.
AP’s and switches are different though, so YMMV.
The good news is that the cAP ax units are so much cheaper than competing products out there that it isn’t too expensive to just try and see.