A bus manufacturer has announced that it could close its facility in a town near Leeds as it faces “tepid” sales of electric vehicles in the UK.