A few security-related questions: how do I automate a web service as much as possible without storing private keys on server?
Set up a cold storage machine, not connected to the internet but with boitcoin installed. Generate a bunch of addresses on the cold storage machine.

Using a USB drive, copy the addresses from the cold storage machine to the online system's database.  No need to do anything with the private keys.

When needed on the online system, just send to 1 of the addresses in the database.  This can be totally automated.  You don't need a private key to send to an address.