Entanglement transitions in one-dimensional confined fluid flows