Is it grammatically possible to change the result clause in a conditional sentence to a participle clause? [closed]

I don't think you can say "don't look at the sentence from the perspective of meaning". The scope of the if clause is unclear. Do you really want the sentence to say that if the parents don't both work, then they cannot teach their children?

On the other hand, you can construct parallel sentences which are grammatical and make sense: While walking on a flat surface, Joe can also chew gum if he doesn't get distracted. So yes, the grammar and the punctuation are correct. But that's less important than making sure that the sentence means what you want it to.