This seems backwards. Let's just assume we're always going to be willingly beholden to tech giants, and so we're going to pass a law to make our masters treat us well.
Maybe instead campaign for a law that says all publicly funded computer resources must be reliably usable for 15 years. So you either go FOSS and save money too, or you get guarantees in writing before you hand over your hand over money to the people who won't even let you see what their code is doing on your hardware.