How do they incentivize government employees into doing such excellent work without paying them a real tech salary?

Use military members.

I was a special agent with an org involved in similar work. They put me through 7 SANS courses, including paying for 5 certs, in 18 months.

They are contractors. The public face of Ghidra works at Praxis, for example.

Great benefits and job security, and a belief in the mission.

The job security perk was recently defenestrated.

Hopefully seen as an aberration. Otherwise we may see the excellent work go out the window along with it.