Can I suggest that using protoboard and jumpers (length of conductors, and connection method) may also be contributing to the resets?
Have you got bypass capacitors on the protoboard where 5V and gnd run?
I have one ceramic 471 on there, if I go larger like 473 I get more LCD problems.
Umm ... this might relate back to that same wire:
If the fan is "vent" (ventilation relay pin) in your code, then ...
It looks like the blue wire (ventilation relay pin) is connected to Mega pin 12, which is IN1 at the relay board. If the grey wire in parallel with it is connected to GND at the relay board, then this wire can cause interference issues through capacitive coupling and inductive coupling. If connected to GND at the relay board (can't tell from the picture), then try a test with it disconnected from GND at the relay board.
You are referring to white(grey) wire you marked in your post #24, which you can see in post #25, in the first pic on the relay, it is hanging in the air, not connected to anything, next pic column on the protoboard is empty and also not connected.
Thanks for pointing interference. I have removed and placed further away LCDs positive wire from the negative ones. It was short test, but I didn't saw any corruption so far.
It made me thinking that it may be something with my PSU, as it is an old one and it maybe doesn't have good protection or it is just low quality.
Since it is in the same plug as the fan, for example, switching fan ON/OFF may interfere with PSU and its constant and power delivery?
This leads me to open it again and check if there is a MOV or capacitor in it, as I can't remember if I saw one.
What would you recommend to use/build for common positives and grounds instead of protoboard?
Simple empty board, that I should just solder pins with one ground line and one positive?
UPDATE: I tried different plug for PSU from a different line and its all the same. . .