Starting the count from the 1940s seems pretty convenient. Jews have been a persecuted minority in the region for centuries previously.
Using history to justify atrocities will just end up in endless misery for everyone. Particularly in the middle east.
This is not entirely accurate. For most of history Jews were tolerated in the region, but even then they were systematically discriminated against through the legal system that would for instance not allow a Jew to testify against a Muslim in court or subject jews and other minorities to taxes not levied on Muslims.
By the late 19th and early 20th century the Muslim world began engaging in the same sort of anti-semitism and pogroms that had mostly been limited to Europe prior. This did largely have its roots in the European influence on Middle Eastern nations but nevertheless the rise in anti-semitism(for lack of a better word since most parties are semitic) in the middle east predated the formation of Isreal in 1948.
It is certainly true that this discrimination was less than they faced in Europe for most of the history of the middle east, but being better than that is a very low bar.