I tried a couple of stretching exercises that have significantly prevented the recurrence of the pain. This is in addition to the usual close-open hand stretch where one closes the hand into a fist and then slowly opens the hand until all fingers are fully stretched out.
The first stretch involves the two hands. You simply hold on to one finger at a time and then gently pull the finger outward to the opposite direction as shown by the arrow below. You could also massage the finger while pulling it.

