It seems that it isn't easy to handle aac/m4a files in sox anymore. Online help threads suggest using ffmpeg to convert it to mp3 instead:
ffmpeg -i input.m4a -c:a libmp3lame -q:a 8 output.mp3
Reference link: https://askubuntu.com/questions/1200430/how-to-convert-m4a-audio-files-to-mp3-use-command-line