Apple, Amazon, and other tech companies reliant on global supply chains stand to lose the most from President Trump’s trade policies, but some software firms expect more demand for their services.