I needed to do something like this. Here is what I did:
1. You need to use your own collector, which installs Net_FTP pear packages. I suggest you develop the one I used (https://github.com/antonyevans/heroku-buildpack-php/)
Then you need to change bin / compile. Key changes are the removal of lines (about 163):
php/bin/pear install mail php/bin/pear install Net_SMTP
And adding the Net_FTP extension:
php/bin/pear install Net_FTP
2. Then you need to tell your application to download the package:
require_once 'Net_FTP.php';
source share