Writing a link cloaking plugin

I don’t see why the same method can’t still work in a WordPress site. If you specifically specify a file to link to that is a valid PHP file, available on your server, then it will still hit that file instead of hitting WordPress. If you are having issues with this working, make sure you don’t have any rewrite rules interfering in your .htaccess file.