Why do you need to use ARM? Couldn't you cross compile on x86_64?
Anyway to answer your question yes you can compile software on arm boards. The bigger question is how long do you want to wait.
If your looking for raw speed I would get either an arm server or a bunch of single board computers. Both of those will require good cooling.
I like pine64 as there hardware is much more hacker friendly than the raspberry pi. https://www.pine64.org/
They even have a board who's purpose is to take other boards. https://pine64.com/product-category/clusterboard/