Zentsuu-ji, which is located one stop away from Kotohira. It's temple 75 on the 88 temple Shikoku pilgrimage, and is the place where Kobo Daishi was born.
Accomodations in Matsue
Kawashima-jou. This is located 10 minutes north (by foot) of the Awa-Kawashima station on the Tokushima honsen. It should be possible to hop off the train coming back from Tokushima and stop in here. Unfortunately, it doesn't appear to be a stop on the express train, so this may be not so much fun.