I don’t think AIOSEO does it through Google Tag Manager. It’s all built-in to their plugin. They may have some sort of custom script in their plugin that detects outbound links and file types, and then logs those clicks to Analytics as Events when they are detected and clicked.
I would request that you take a look at how it’s done (many other Analytics plugins also do it, including MonsterInsights).
Check out this screenshot from a site with AIOSEO and link tracking: https://i.imgur.com/c4ZdsJO.png
They seem to be adding a new file with that functionality. Here is that file:
https://www.aprilthegiraffe.com/wp-content/plugins/all-in-one-seo-pack/public/js/vendor/autotrack.js
I like the simplicity of your plugin, but it would be a nice feature to have an option of enabling outbound/external link tracking. Even if it were a Pro feature (another selling point that I’d be happy to upgrade for).