My dad had given me a book of short sci-fi stories before he left. I remember reading one around 2004 that has stuck with me but I cannot find it. Hopefully some of the old school sci-fi readers will see this, and point me in the right direction. So I'm going to try to be very specific with the plot.
4 or 5 Human ships crash unto an alien planet populated with alien life similar to Native American level knowledge (I remember them biologically being like frogmen.) and after generations each crashed ship is turned into a fortress and the offspring from the captains each rule their respective ship fortress kingdoms separately.
Science has been largely forgotten and what little weapons and technology from the past is relegated to the noble class. The ship based weapons had been kept pristine outwardly by constant cleaning and worship. They were believed to be functional but in fact the inward components had been destroyed and rusted away through generations of neglect.
A mage class assisted each "Captain". With several supposedly commanding giant metal beasts that would assist the mage and their captains in battle. These metal beasts were made real psychologically through psychosomatic suggestion and rumors/stories told through the human population.
They also had a physical representation sometimes that was little more then animatronic like statues that rolled along with them into battle. In one scene a siege occurs. A metal beast statue breaths fire and lights dummies wearing the enemies uniform on fire. Causing the defenders to panic and believe that they too were "magically" burning.
Another scene introduced a mage that would summon demons to possess his warriors, which manifested as a psychotic rage and sent them into battle capable of losing limbs with no regard. This was achieved by burning a mixed incense into an enclosed room filled with 20-40 warriors, while said mage would chant wearing an ancient gas mask (It was heavily implied the incense contained drugs). Those who breathed the incense would die an hour after initial inhalation.
The technological level of the human descendants were medieval and while magic and metal monsters existed culturally. Their perceived existence was maintained through tricks and psychological manipulation by the mage class of society.
In the end an apprentice mage who seeks the secrets to "real magic" rediscovers the scientific method which saves the humans from a horde of angry alien frogmen attacking the kingdom.
Sorry for the grammar/formatting appreciate any help you can give. The book this short story was in also contained stories by Robert Heinlein and a few others