Nowadays, the right way to install sox on macOS is Homebrew. Simply by using the following command in the terminal:
brew install sox
This installs sox and all its dependencies on macOS 10.12 Sierra and higher including building/patching libmad for both 64-bit Intel and ARM (Apple silicon) architectures.
https://formulae.brew.sh/formula/sox
Checked and working here on both High Sierra (64-bit Intel) and Big Sur (ARM).