The CLASS statement may have trouble when the data have very high cardinality. I don’t know just how big that number is.
I’ve been counting AES lately by SOC HLGT and PT with several thousand AES with no problem, granted that ain’t millions. When running on a multi processor system using CLASS instead of BY, MEANS/SUMMARY can produce astounding performance.
I would not eschew CLASS just because I “think” it might not work, I would find out first.