Hello Simon,
I think the best you can do is ensure that your script WILL produce
valid configuration. That means allowing your users to add only
valid vhosts, with valid chars, valid length, etc. The front-end
should verify this. And your script should be sure that it takes it
from db and makes proper conf files for apache.
I am using similar approach with apache1.3 for about year. My script
never produced invalid conf files, but few times apache refused to
start with some conf error - but there was no error and manual start
worked fine. So you should and a check if apache is still running
after your restart.