The threat of cross-border smuggling is one of many challenges facing the London and Dublin governments as they plan for Britain’s withdrawal from the EU.