With plastic-fantastic pistols, I know there is some meat on the bone. If I remember right, the manufacturing cost for one Glock is like $80. Now that ignores all their overhead, like their undoubtedly enormous insurance bill, taxes, marketing costs, R&D, and donut Fridays. But when you can make one new gun and sell it for $550, there's a lot of money to cover all that.
If I had to make a bet, I'd say that Glock sells their pistols to agencies at very close to their true cost, maybe even as a loss leader, and uses armory support contracts and the civilian market to make their profits.
As far as the final cost to get a Glock into consumer's hands: we've recently seen Ruger willing to jump in the game with a plastic service pistol for about $350, and I would imagine that Ruger's cost to build that pistol isn't that far off of Glock's. Glock is likely taking the extra $200 or so you pay for "perfection" and sticking it in their pocket.
People still buy Glocks left and right, so I can't blame them for it. AFAIK, they haven't offered a sale or rebate or anything since the election, so if this extreme buyer's market doesn't lower their prices, then I doubt that anything will.
So there's some comfortable margin to be had with Glocks, but I think AR prices are probably about as low as they can go. The rifles are just completely commodified. Everyone's assembling the same parts, building the exact same gun, and and no one can jack up their prices because 10 other companies would undercut them if they tried. $400 for a finished AR in the customer's hands is probably the realistic floor.
(And before someone mentions that $359 Delton: I had never even heard of it before it got ultra cheap, and I don't think anyone wants buy a slick sided 16" HBAR carbine anyway. My guess is that Del-Ton is dumping inventory with that one).