I can confirm that the problem disappeared after inserting those Logical Level Converters. I used two 8-channel converters, each with 3.3V, 5V, and GND attached to the GPIO, and the relayboard only having GND and the input pins attached, no need to connect its 5V "inputs" (which I think are reference outputs). The boards I used look similar to this: