President Trump is considering a plan that would give the U.S. government direct stakes in leading AI companies, putting him in unusual alignment with some of his fiercest critics. The…