You do know that Glock's margin per pistol is about 68%
"In a 1994 patent lawsuit in the U.S., Glock estimated its profit margin per pistol at 68%."
Glock's Secret Path to Profits - Bloomberg
So selling your $500 Glock to police agencies at $200 is still a profit making business. I reads somewhere else that the manufacturing cost per pistol is about $75.
To the OP, you'll never sell your well used $500 Glock for anything close to $500 unless you are in California. If it isn't well used, then you're telling me you
did buy the gun with the expectation that it will hold it's value.
Maybe you should have invested in Yugos.