The background is not quite as you describe; the 427th Light Maintenance Battalion of the Imperial Space Marines is stranded largely by being forgotten, and the Galactic Protectorate (a successor state to the Empire) hasn't so much lost technical ability as stripped competent personnel from the fleet to keep it from being able to revolt.
That said, I'm fairly confident you're describing "The Specter General" (1952) by Theodore Cogswell. As mentioned by @user14111 it appeared in Astounding Science Fiction, June 1952.
During a millennia long war, a techie outpost planet was separated from the society and became a lost colony.
"The battalion was set down here to operate a forward maintenance station for his ships. We waited but no ships came. For five hundred years no ships have come,” said the colonel somberly. “Perhaps they tried to relieve us and couldn’t, perhaps the Empire fell with such a crash that we were lost in the wreckage."
Centuries later, the techies had regressed to the point where they were treating the repair/maintenance tasks as religious rituals.
Not religious rituals, but essentially just learning divorced from the practical reality of their situation:
"It's nonsense, superstitious nonsense. You!" he said, stabbing his finger into the chest of the startled lieutenant. "You! Dixon! You spent fourteen years in the Tech Schools just like I did when I was a recruit. What for?"
"To learn maintenance, of course," said Kurt.
"What’s maintenance?" demanded Blick.
"Taking stuff apart and putting it back together and polishing jet bores with microplanes and putting plates in alignment and checking the meters when we're through to see the job was done right. Then there’s class work in Direc calculus and subelectronics and—"
"That's enough!" interrupted Blick. "And now that you've learned all that, what can you do with it?"
Kurt looked at him in surprise. "Do with it?" he echoed. "You don't do anything with it. You just learn it because regulations say you should."
the techie societies' main weapon was an obsidian hand axe.
The commander's eyes flicked down to the battle-ax that rested snugly in its leather holster at Kurt’s side. "You keep a clean sidearm, too."
Kurt uttered a silent prayer of thanksgiving that he had worked over his weapon before reveille that morning until there was a satin gloss to its redwood handle and the sheen of black glass to its obsidian head.
One techie was spying on the disagreement between 2 of his superiors, who were settling said disagreement with obsidian hand axes.
This happens when Lieutenant Dixon is trying to escape from prison, having been locked up for defending Colonel Harris when Colonel Blick took over:
The captain's face flushed with rage. With a snarl he tore off the major's breechcloth and struck him in the face with it.
The major's face grew hard and cold. He stepped back, clicked his calloused heels together, and bowed slightly.
“Axes or fists?”
“Axes,” snapped the captain.
inadvertently triggers a hatch mechanism in the "holy temple" (i. e. mech hanger) This drops him into a pilot seat of a mech, and launched said mech into orbit
Kurt quickly scanned the hall for a safe hiding place. At the far end stood what looked like a great bronze statue, its burnished surface gleaming dimly in the moonlight. As the door swung open behind him, he slipped cautiously through the shadows until he reached it. It looked like a coffin with feet, but to one side of it there was a dark pool of shadow. He slipped into it and pressed himself close against the cold metal. As he did so his hipbone pressed against a slight protrusion and with a slight clicking sound, a hinged middle section of the metallic figure swung open, exposing a dark cavity. The thing was hollow!
Kurt had a sudden idea. "Even if they do come down here," he thought, "they'd never think of looking inside this thing!" With some difficulty he wiggled inside and pulled the hatch shut after him. There were legs to the thing—his own fit snugly into them—but no arms.
Fiddling around inside the suit, trying to unlatch it, Dixon manages to engage the rocket pack, sending him into space.
This beacon was picked up by a pilot scout ship, which comes and picks up the mech.
Flight Officer Ozaki was taking a cat nap when the alarm on the radiation detector went off. Dashing the sleep out of his eyes, he slipped rapidly into the control seat and cut off the gong. His fingers danced over the controls in a blur of movement.
Turns out that the pilots had lost all the other technicians centuries before, and was in the same technologically regressed situation, but reversed. They had the tech, but couldn't repair it.
Not all technicians, but they have far too few to maintain their fleet:
Schninkle coughed modestly. "Well, sir," he said, "as long as you have a situation where technicians are sent to the uranium mines for making mistakes, it's going to be an unpopular vocation. And, as long as the Lord Protector of the moment is afraid that Number Two, Number Three, and so on have ideas about grabbing his job—which they generally do—he's going to keep his fleet as strong as possible and their fleets so weak they aren't dangerous. The best way to do that is to grab techs. If most of a base's ships are sitting around waiting repair, the commander won't be able to do much about any ambitions he may happen to have."
As a result the state of the fleet is fairly dire:
At War Base Three nobody was happy. Ships that were supposed to be light-months away carrying on the carefully planned search for General Carr's hideout were fluttering down out of the sky like senile penguins, disabled by blown jets, jammed computers, and all the other natural ills that worn out and poorly serviced equipment is heir to.
And from the point of view of a pilot:
Flight Officer Ozaki was unhappy. Trouble had started two hours after he lifted his battered scout off War Base Three and showed no signs of letting up. He sat glumly at his controls and enumerated his woes. First there was the matter of the air conditioner which had acquired an odd little hum and discharged into the cabin oxygen redolent with the rich ripe odor of rotting fish. Secondly, something had happened in the complex insides of his food synthesizer and no matter what buttons he punched, all that emerged from the ejector were quivering slabs of under-cooked protein base smeared with a raspberry flavored goo.
Not last, but worst of all, the ship's fuel converter was rapidly becoming more erratic. Instead of a slow, steady feeding of the plutonite ribbon into the combustion chamber, there were moments when the mechanism would falter and then leap ahead. The resulting sudden injection of several square millimicrons of tape would send a sudden tremendous flare of energy spouting out through the rear jets. The pulse only lasted for a fraction of a second but the sudden application of several G's meant a momentary blackout and, unless he was strapped carefully into the pilot seat, several new bruises to add to the old.