Good question!
The Gulf War was definitely an influence and for pretty much the reasons you laid out. The Yugoslav Wars were also going on through the run of the series, and the Lebanese Civil War had just (mostly) ended, and the messiness of those conflicts, with their shifting ethnic and sectarian alliances and clashes, influenced us as well.
Overall, I think these events influenced DS9 to be a bit muddier than other Star Trek shows. The elegant, hopeful, but perhaps overly simplistic, “See a problem, solve a problem, warp away” storytelling of much of TOS and TNG seemed a bit less “true” given the times. We tried to bring in less certainty, more shades of gray, while still telling stories about good people trying to make the universe a better place.
All media are products of their time.