Wow, MM I'm sorry I never saw this thread.
Tommy a cron job is the right direction, however if you have a huge DB (I have many like that) the optimize can put an undue load on the system.
I'd be more interested in seeing how you are corrupting the tables MM... I had a problem like that quite a while ago, but it is VERY irregular for MySQL to regularly puke on you... would you care to talk about what you're doing and maybe we can triage it?
If you even remember you posted this thread

(Thanks Tommy, can't believe I missed this one...)