The thing about peaceful cichlids is that they’re usually peaceful with other species, but not within with own. A lot of profiles online and in print don’t take into account the conspecific aggression of cichlids. They often have pecking orders within their groups, which is why more of a species is usually better (though in some cases that’s not feasible due to fish size vs. tank size).
I always grow out cichlids, even peaceful ones, in groups of at least six but preferably more. I’ve done the same with keyholes, but they were in a 4’ 55 gallon until they were 3.5” or so and then were moved to a 6’ 150 gallon community. They squabbled and nipped at one another occasionally but there was plenty of room for them to get away from each other or steer clear of the others.
My guess is if you had them in a larger tank they could spawn without having to badger the unpaired fish, but even a tiny pair of cichlids will take over a 40 gallon when they’re ready to spawn. My vote would be to rehome the others because it probably won’t settle down if the fish spawn frequently.