Community opposition to big battery farms is spreading across Washington just as the technology takes on growing importance for the state’s clean energy transition and to stabilize the electric grid.