1. He stopped exercing.

2. He stopped resting to exercise.
3. He stopped to exercise.
==================
Q1: Are they all grammatical?
Q2: Does #1 mean that he stopped exercing temporarily or forever?

All are grammatical. #1 could mean either (because he was tired or had other things to do), or forever.