The cure is simple: software WITH ANYTHING AROUND (toolchains, docs, interfaces for the hw etc) must be open by law. So government in Democracies if Citizens allow that can potentially do something accepted by the majority BUT there are no black box on sale.
Secondly remember a thing: if someone can do something, anyone potentially can, anyone means also the enemy of the one doing something in the first place.