President Trump on Thursday is set to sign an executive order that could open the door for federal regulators to punish Facebook, Google and Twitter for the way they police content online, a major broadside against Silicon Valley that quickly triggered wide-ranging political and legal opposition.