At least in the case of the Maya, literacy was carefully guarded so that a small class of priests could exercise precisely this kind of control. In fact, this is believed to be one of the reasons why modern Mayan languages are written in the Latin alphabet, even though there's a complete Mayan script that was the most developed writing system in the Americas until the conquest.