I discovered that I can use the Trim feature in QuickTime Player with m4a files as well as movies, even though it appears to save the file in .mov format. First find the file you want to trim and open it in QuickTime Player. Select Edit » Trim, use the slider to trim to the required length, then press the Trim button.
Select File » Save, and save the file as a Movie. Go to Finder and replace the .mov file extension with .m4a. The file will be recognized as an m4a audio file, and can be imported to iTunes.
Also, To Secure your macOS from virus and trojans, use always a mac optimization software like Mac Optimizer.