Diagnostic
It turns out that the kernels >4.19 are the culprits. The problem is related to the iGPU (Intel core i5-8250U with UHD 620 on the Latitude 7490) and the "Panel Self Refresh" feature that is enabled by default on kernels >4.19.
https://medium.com/@natchanan.th/linux-5-x-random-kernel-panic-workaround-4e063e4d34a7
https://www.reddit.com/r/linuxquestions/comments/k4imsd/freeze_on_kernels_419_because_of_i915_dell/
It seems that some other Dell models are concerned, but it's not clear if all of them have a UHD 620 iGPU, or if models of other brands are concerned too...
Solutions
I installed Xubuntu 18.04 LTS (kernel 4.15) and had no more freeze.
The solution with more recent kernels is to disable the PSR feature, by creating this configuration file:
sudo echo "options i915 enable_psr=0" > /etc/modprobe.d/i915.conf
In practice I created the file under Xubuntu 18.04, and then I upgraded to 20.04, and eventually 22.04. If one wants to directly install a recent version, it seems that the option has to be passed to Grub at boot time at least to have a session that doesn't freeze (and then one can create the configuration file)
More troubleshooting
The above solution does actually not completely eliminate the freezes. They can still happen when the screen wakes up after being put to sleep.
To avoid that, I have found that in Settings > Power Manager > Display, it was enough to set "Blank after" on "Never". Strangely, it is possible to use "Put to sleep after" and/or "Switch off after", without having freezes. Also, putting the OS to sleep (suspend) doesn't result in a freeze after wake-up.