Again only speaking for Iraq, I think both you and Justice have equally valid points.
Historically speaking Iraq has been home to a diverse group of ethnicities, religions and identities. Arabs, Muslims, Kurds, Turkmen, Yazidi, Jews, Zoroastrian, Christian, Armenian, there’s probably loads I’m not even aware of!
I’ll stick to Jews as that was the original comment, in the 20th century as reported by a prominent Iraqi Jewish (now Israeli / British) historian who was also born in Baghdad the Jewish community was deeply integrated into wider Iraqi society.
This changed completely following the Arab- Israeli conflict and what Arabs call the Nakba where 750,000 Palestinians either fled or were forcibly removed from their houses. Jews were persecuted by the Iraqi government systematically and continuously, including passing laws to strip Jewish Iraqis of government positions, laws to prevent them from leaving the country, forcing them to renounce their Iraqi citizenship if they did and pretty much every other discrimination you can think of (including public hanging). To this day, only a terribly small number of Jews are in Iraq - some figures say less than 5, some say a few hundred - I have no idea unfortunately.
I suppose an interesting conversation to have with someone with more information than me would be - was the catalyst for this persecution the creation of the state of Israel, so then the Iraqi state felt they suddenly had an “Option” to dispossess their Jewish citizens as now they had somewhere to go - thereby supporting the idea that the government at the time was just waiting for an excuse to persecute and remove Jews. Or, if this was a response to the Nakba and the forcible displacement, murder and various other heinous crimes committed against Palestinians (majority or Arab and Muslim identity) so the Iraqi government decided to “punish” a completely unrelated group (Jewish Iraqis) for the actions of an entirely different group of people.
I think either way, we as a global community should be using all these times in history as lessons of what not to do - which is punishing and committing Human Rights violations against a group of people because of perceived affiliations, religious and ethnic identities or as a way to get “back” for a previous crime committed.