Having worked in the sector myself, I can pretty much assure you that a government wont ever replace contractors this readily. It’s far, far more difficult than just “investing in their own digital team”. Some government contracts with private companies span decades.
I think Palantir would be a good choice. The only risk in my opinion is any negative press resulting from their practices (https://www.bloomberg.com/features/2018-palantir-peter-thiel/ for example)
However I doubt this would really impact them, they seem to be out in front in many areas.