Honda's decision is based on their forecast of the economic consequences of the move to low emission cars and the ultimate demise of the internal combustion engine upon their company, just like Nissan.
In other words, they would have closed Swindon at some point even if the Brexit fiasco had never happened - at least Honda told it like it is and didn't hide behind "the uncertainty of leaving the EU".
BMW have played it right. If we stay in, they have a car plant to build the electric Mini for the EU. If we leave, they have a car plant to build the electric Mini for the UK. Damn clever, these Germans......