This is just a theory, but I wonder if some plants sometimes go into a kind of dormancy. Seven years ago DD bought me a day lily, which I grew in a pot. It flowered for a couple of years and then it stopped and refused to flower, despite being repotted. When we moved, I was almost tempted to leave it behind, but I brought it anyway. It still didn't flower but I took it out of the pot, put it in a corner of the garden and left it to itself. This year, four and a half years after we moved, it is full of flowers! I believe agapanthus can behave similarly. I'm sure someone more expert will give you better advice
.