The answer is yes to both.
It would require some sort of mail daemon, and yes it can be done in PHP.
You may need to read the documentation for your MTA. Usually what is involved is setting up a mailbox (for example, a Unix user) and then having a file (for instance .forward) which contains the commands necessary to run PHP.
The email (including its headers) will then be available on PHP's stdin, and it can take action accordingly.
Be very careful when implementing this - DO NOT CREATE MAIL LOOPS.
Remember that someone sending a message could have an auto-responder themselves which is stupid and responds automatically to each message.
Also be aware that bounce-handling is nontrivial. Some of your messages may bounce and hence come back. You should be able to identify a bounce and ignore it (or log it etc).
The easiest way to prevent mail loops is just to keep track of addresses you've sent to (perhaps only recently) and NOT send any further messages to that address.
If you need to send multiple messages to the same address, a rate-limiter would be a very good idea.
Mark