First of all, lets get an obvious ugly elephant out of the way:
...individual thought, philosophy, science, and basically everything the
church hated in the dark ages...
"Dark ages" is a bad term, ill-defined in terms of both time and place. Thankfully, it is quickly becoming obsolete as a term related to real life history. The traditional definition of times when "Science, philosophy and literacy" didn't exist, don't really hold looking in detail at what was happening in the Europe after the Western Roman Empire fell. Clinging too much to this term only helps to propagate the nonsensical and tired "dirty, rainy gray-brown Middle Ages" trope.
Also, claiming that the Christian Church is somehow responsible for the "Dark Ages" is ill-informed and the opposite of what really happened.
Even before the fall of the Roman Empire, the Church had its own philosophers and philosophical school of thought. This era of Christian philosophy is called the Patristic era. During them, the goal was to establish unified Christian theology and philosophy and was done through, in a great part, by arguing with classical philosophy. St. Augustine, for example, promoted the knowledge of Greek philosophy, though in order to be able to dismiss it with Christian arguments. Nonetheless, the method of classical philosophy and argumentation were widely adopted by the scholars.
To be truthful, certain cherry-picking occurred and some Greek philosophers were disproportionately more cited, copied, and preserved. Early Christian scholars loved them their Plato or Aristotle.
There were also the people like Tertullian who openly opposed the idea of studying non-Christian works, but those views were more fringe views. As a result, many scientific and philosophic texts were kept, translated and copied in monasteries. For example,
The best know of those scholars of the Dark Ages was Alcuin, a polyglot theologian who worked closely with Charlemagne to restore
study and scholarship in the whole of West-Central Europe. In
describing the holdings of his library at York he mentions works by
Aristotle, Cicero, Lucan, Pliny, Statius, Trogus Pompeius, Virgil. In
his correspondence he mentions Horace, Ovid, Terence. And he was not
alone. The abbot of Ferrieres (c. 805-862) Lupus quotes Cicero,
Horace, Martial, Seutonius, and Virgil. The abbot of Fleury (c.
950-1104) demonstrated familiarity with Horace, Sallust, Terence,
Virgil.
The greatest of abbots after Benedict, Desiderius, who eventually
became Pope Victor III in 1086, personally oversaw the transcription
of Horace and Seneca, Cicero’s De Natura Deorum and Ovid’s Fasti. His
friend Archbishop Alfano (also a former monk at Montecassino) was
familiar with the works of ancient writers quoting from Apuleius,
Aristotle, Cicero, Plato, Varro, Virgil. He himself wrote poetry
imitating Ovid and Horace. Saint Anselm, as abbot of Bec, commended
Virgil and other classical writers to his students.
The other great scholar of the so called Dark Ages was Gerbert of
Aurillac who later became Pope Sylvester II. He taught logic but also
ancient literature: Horace, Juvenal, Lucan, Persius, Terence, Statius,
Virgil. Then there is St. Hildebert who practically knew Horace by
heart.
(Paparella, Medieval Monasticism as Preserver of Western Civilization, 2008, accessed 3/22/2024 at Metanexus.com)
Beyond that, monasteries also conserved agricultural practices, metallurgical practices, stoneworking, beekeeping, winemaking and many other technological tidbits.
Well then, if all that knowledge was preserved, why do people call it the "Dark Ages"?
Well, that is because...
While most knowledge was not lost, the organization to deliver and exploit it was destroyed
...in Western Europe by the fall of the Roman Empire. Indeed, if you look at the Frankish Empire, as soon as someone is strong enough to enforce some kind of coherent organization, the country can jump exponentially by exploiting conserved know how.
We have now established that the knowledge existed, there were educated individuals able to teach it, and it was available on a state-wide scale if conditions were right. So,
Why didn't the knowledge get to the ordinary people?
There are several factors playing into this.
First off, Missing Infrastructure.
Roman society was highly urbanized, based on densely populated areas. With post-Roman agricultural society—which relied on smaller, somewhat isolated communities—building of educational infrastructure required much greater investment to be practical. Individuals seeking to get their education were required to abandon their community to get it, which was problematic. At the same time, there was also a:
Sharp decline in the European population.
As a result, it was impractical to exclude able-bodied people from fieldwork to pursue education and, by extension, occupations that required literacy. Because of this, there was little incentive.
Outside the church, there were little to no job opportunities for the literate. In feudal (and proto-feudal) society, social mobility simply did not depend upon one's literacy. Birth was everything. As a result, if you went to all the trouble and expense to get educated, your job opportunities were limited to joining the Church or seeking a (relatively rare) job as a court scribe.
Finally getting to the point:
The first thing to decide is the incentive. What incentive would normal people have to strive for education; but also, what incentive would a church have to provide it?
Let's say the church plays a very active role in the administration of the realms, and therefore seeks to widen their talent pool as much as possible. Additionally, they can purposely complicate the bureaucracy to get many of "their people" into the government.
If selection for positions of power was traditionally meritocratic, common people would have incentive to get at least some of their children literate.
You need to keep high population, or at least high density locally, so there is enough, workforce that sending some individuals off to get educated won't endanger the community, thereby causing educational infrastructure to become more efficient.
To achieve this, centralize and make cities the centers of political power early (in our world this started to happen in the late medieval era, when literacy proportions also started going up again). The administrative center of a city may be a monastery.(as I mentioned earlier, they are the pickle cans of knowledge.)
If you keep high centralization, but with low overall population, suddenly the states will consist of swaths of wild country with islands of civilization centered around cities. Long-range communication based on written language will become necessary for administration of such states, adding another incentive.
Let the church have important technology; printing press and papermaking were central to making literacy widespread. Since it needs to meet the literary needs of more people, your Church would have a lot more to print.
A final optional change would be to have the Church preserve all knowledge, not cherry-pick the bits they thought were interesting or useful at the time.