I think the AI measures their firepower vs yours and makes a decision based on that(in addition to relations, etc.). So if you're maxing out your fleet potential, they won't declare war because they don't have much of an advantage, if any. At least that's what I imagine is going on.
I think the way to go about fixing this, at least partially, would be to make coalitions against a single empire/player. Not necessarily between allies, but generally just a diplomatic option that says 'If someone goes to war against this empire, or if this empire goes to war against someone else, I'll join in on the opposing side'. That way, someone who would like to declare war against that empire would be measuring the coalition's firepower vs that empire instead of just their own.