Trump’s comments align him with allies like Elon Musk, who has suggested that the judiciary’s power over the executive branch should be curtailed.