I have finally given up on the iMac. I've switched to my old Windows 10 PC desktop with HD 2500 graphics. Initially, I connected a Samsung 971P by DVI. Despite it being way better than Mac, my eyes still got tired (watering, dry eye) a bit after several hours. Ditherig seemed to help a bit, but I'm not sure as basically, I could not tell the difference. Anyway, the feeling was nowhere near that on Mac: nervous strain has gone.
I then connected another old display from like 2007 — a Philips 190WV with CCFL backlighting and TN panel by VGA cable, and this one turned out to be very good for the eyes. I don't get tired, except a usual tiredness one would expect from spending many hours in front of a screen doing work. Colours are not as nice as on an IPS or a PVA, but this is not important for text. I spent 3 weeks straight for 12+ hours working with the text and I wasn't exhausted like on iMac. I could finally relax and concentrate on thinking. I have connected the Samsung as a 2nd display and occasionally look at it for reference materials — and it's fine for such usage.
iMac is still in the household: my wife wanted to learn Photoshop on it, so we have not sold it yet. She does not feel any strain so far. But she doesn't work with the text. My son also says he does not have any strain when he occasionally uses iMac for browsing or movies. They both like it. I can also watch movies on iMac, but I cannot work with the text.
I should have stopped using this machine a long time ago, but I still hoped I could make it usable. All the tweaks I applied made things better, but they did not remove the main reason which caused that tiredness in the eyes and the nervous system. Probably it's dithering, but the iMac screen has other flaws: it's glossy, too bright, it may have a PWM at lower brightness, not enough contrast at lower brightness, glass surface on top of the panel which might cause light reflections... And still, aggressive graphics are its major drawback.
So the conclusion I've made: no, it's not possible to get used to a device if it's bad for you, it's better to stop using it immediately.
I was surprised that such a basic display as this Philips, with PWM (I think so) and poor colours, was actually the best for the eyes. It's not like paper, but I can work all day on it with small regular breaks. I don't know what is the reason: a CCFL backlighting or a VGA connection. Anyway, if I want to upgrade (the monitor is a bit small), I will stick to these two features: CCFL and VGA. And probably TN, as it's fast, which is important when constantly switching apps.
After switching back I was surprised how better Windows is in terms of usability. Some of the examples are switching between apps/windows and closing/minimizing apps. It's more intuitive and logical. Multilingual support is also way better on Windows. Eyes comfort: In Windows, animations are smooth and easy on the eyes. On iMac, they caused me eye discomfort, so I tended to switch them off. Fonts are easier to read on Windows, despite a low resolution.
And as a conclusion, I'd like to add that I've analyzed my computer usage and realized that I could never use any laptop for a long time: my eyes were getting tired (like a loss of focus). So I was always working on desktops (Intel or Nvidia graphics). And this iMac is also technically a large laptop.