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.
Were there enough progressives in the right positions of power to make that happen, though?
One advantage that centrist / establishment types have is that they are everywhere and people are used to them. And they sometimes actually coordinate when the status quo gets threatened.