Another way to encourage interoperability is to use the government to hold out a carrot in addition to the stick. Through government procurement laws, governments could require any company providing a product or service to the government to not interfere with interoperability. President Lincoln required standard tooling for bullets and rifles during the Civil War, so there’s a long history of requiring this already. If companies don’t want to play nice, they’ll lose out on some lucrative contracts, “but no one forces a tech company to do business with the federal government.”
That's actually a very interesting idea. This benefits the govt as much as anyone else too. It reduces switching costs for govt tech.