Try A Canticle For Liebowitz.
As with most such SF topics, Heinlein did it earlier. And perhaps better. I think it was "Revolt in 2100."