What kind of research happens outside academia-attached labs like JPL and outside MIC firms like lockheed/boeing?
There are a fair number of engineers at centers (Stennis, Ames, Kennedy, etc.) that are government employees. When I was NASA-adjacent, it seemed they wrote the specs and testing regimes. I think the government even did some of the testing with government-employed test engineers and technicians. But yeah, a lot of the manufacturing is done by contractors.
There's a joke in the aero world that F-16s are designed by people Ph.D.'s, manufactured by people with Masters degrees, flown by people with a Batchelor's degree in History and maintained by people with a High School Diploma.
It turns out you have to make jobs for people at all levels of education and experience.
Ingenuity (Mars helicopter) had researchers at Ames and Langley Research Centers, for example. Super cool IMHO.
https://en.wikipedia.org/wiki/Ingenuity_(helicopter)