Is the language $(a^n)^mb^n$ context free?
The difficulty of trying every possible $m$ is, in fact, insurmountable. That language is not context-free.

For the sake of contradiction, assume it is context-free. Let $p$ be its pumping length. Consider the word $a^{p^2p}b^{p^2}$. I will let you take it from here.