The role of domain walls in energy transfer mechanisms between two connected one-dimensional ferroelectrics