The sweeping tariffs that President Trump announced on Wednesday could hobble the use of giant batteries that energy companies are increasingly installing to help them tap more wind and solar power and make the broader electric grid more reliable.