Josephson current flowing through a nontrivial geometry: The role of pairing fluctuations across the BCS-BEC crossover