Hell’s Foundations Quiver (Safehold #8) by David Weber
Synopsis from GoodReads:
TURNING OF THE TIDE
Centuries ago, the human race fought its first great war against an alien race—and lost. A tiny population of human beings fled to distant Safehold. Centuries later, their descendants have forgotten their history; for them, life has been an eternal Middle Ages, ruled by the Church of God Awaiting, whose secret purpose is to prevent the reemergence of industrial civilization.
But not all of Safehold’s founders were on board with this plan. Those dissidents left behind their own secret legacies. One of those is Merlin Athrawes, cybernetic avatar of one of Earth’s longdead defenders, now reawakened after a thousand years to restart human progress and reclaim our place in the universe. Merlin has intervened in the small Safeholdian realm of Charis, seeding it with ideas and innovations and helping it to rise to challenge the hegemony of the Church.
It’s been a long and bloody fight, but aided by a stream of inventions—breechloading rifles, signal rockets, claymore mines, new approaches to manufacturing and supply—Charis and its few allies seem to have finally gained the upper hand. Now major realms have begun to consider switching sides.
To all these ends, Merlin Athrawes has been everywhere, under multiple disguises and wielding hidden powers. The secret of who and what he is has been closely held. But a new player has arrived, one who knows many secrets—including Merlin’s own.