I believe autophagy doesn't kick in for the first 5 days, so if you want to preserve all muscle mass, that's the window to stay under. Once you go after that, the changes aren't that dramatic either, so you'll recover whatever muscle loss you incur fairly quickly as long as you're fasting while still having fat reserves. Once you're out of those, fasting is a bad idea, in the sense that you will start dying.
https://www.amazon.com/Complete-Guide-Fasting-Intermittent-A... - another book by Jason Fung that covers water fasting more in depth.