Pastor Martin Rinkart wrote "Now Thank We All Our God" despite his parish's tribulations of plague, famine, and war. I refer you to Pam Griffin's Story Behind the Song, linked HERE.
---
He lived in Saxony 1586-1649, more than a hundred years after Luther.