But your plan assumes that the 2 neighbors production is complementary, what is is a bad winter, the demand raises in both countries, wind turbines need to be stopped for some reason and not country B needs to beg from country A, so A needs now to decide if they sacrifice their citizens to help the ones in country B.
You would need more then 2 countries to reduce the risks and you need some power plant that can work at a low capacity during the year but can fast go to full capacity to handle this cases, now this plants will not be profitable when running at idle/low capacity so you need some non-free-market program to keep them running.