Currently, a formula template cannot be restored to a previous version but in case that you have added a new step that wiped out all the other steps, the workaround is to add on success a previous step which you had before creating the new one (which wiped out the other steps). This will bring up all the following steps and the formula flow will be restored as the steps will maintain the inheritance.