^Batman is not applicable in this case because WB does not face the same pressure of HAVING to develop a movie every five years. Plus, they already know the potential of the character on film as evidenced with the huge success of the 89 film and a hit with the 95 film. So they have the luxury of waiting any amount of time if they want, if one film doesn't up live up to their expectations, because they know if done correctly, the success will come, the proof was there.
As for Hulk, that's a good question. Perhaps the studio thought that more than 5 years was needed to properly reboot the character and have a really big payday. In the end, they would have still turned a profit, but like you mentioned, it probably wasn't worth it (not a big enough of a profit) to put the effort back into the character without having a suitable enough of a time gap.
Perhaps this could happen with the DD and F4 properties. I really hope so. But with X-Men, I just don't see it. The proof is there that the franchise can be incredibly successful, not lukewarm or a modest hit but an actual blockbuster. Once that level of success is reached with a franchise, I have trouble believing the studio would have any kinds of plans of dealing it off in the future. Especially with the amount of characters in the X-Men universe and all the different stories that can be told, I can't see that well going dry for them. And they always have the success of the 3 X-Men films to fall back on and say to themselves that the success was reached before, surely it can be reached again.