I also worked on two rewrites in my previous jobs and both failed miserably… The only way I see a rewrite could work is when you are extracting one feature from your product and creating a new one based on that. There’s no way it’ll work if you want to keep (a large portion of) the same features/bugs.