IPS panels have been around for a while. The 3017 was released in 2017 
My X240 with the image retention issues was released in 2015. I consider IPS panels from that era early. Sure the technology is older but it took a while for it to become prevalent. TN panels were just much more common throughout the earlier yearssdl.
I'm familiar with what you say and similar issues with overdriving LCD panels leaving all sort of shadows behind but this is not the case. My OTHER Dell monitor, U3014, has some "overshooting" when scrolling while a twin U3014, but on a different revision, does not.
What you linked would drive me crazy, I can assure you that this is not the issue.
It absolutely did drive me crazy. I had the display swapped twice. The first swap was against an identical display (part no.: 00HM111) which showed exactly the same image retention issues as the original display. My third display then was an 00HM745, which judging by the specs is an identical IPS panel, however it did show no image retention at all and works flawlessly to this day. So I assume that those 00HM745 display either are an updated revision or came from a different supplier. Either way you can't necessarily assume that two screens use identical hardware just because they are part of a device with identical maker and model number.
Of course I don't know much about the backstory of your monitors. Did you recently acquire the misbehaving one or do you own it for a longer period of time? The "tiktok"-logo issue just sounded very much like bad IPS-panel quality issues. However if you have owned the misbehaving monitor for a longer period of time and had no "ghost images" prior, this rules out the IPS-image-retention issue. If you have a bad IPS panel this issue will have been present since the day the screen left the factory.
IF you recently acquired the misbehaving monitor you could try to swap the panel over to the working one. If the issue moves with the panel it is the panel itself otherwise it has to do with other components like the PSU or the main-board. I'm not familiar with the UP3017 so depending on how much effort a panel swap is you might want to save this as a last resort though and try other things first. For instance swapping the main board and/or power supply may be easier than swapping the panel on that screen model.
Yes, I do have night shift on my computer and indeed I assumed it was something related to that. But I can assure you I unplugged EVERYTHING from the monitor and when I plug MAINS back in, even the MENU is showing the same issue with NO INPUTS connected. I've also tried switching to my Windows PC while the issue happens and it also happens there.
Okay that pretty much rules out the night shift mode as a culprit.
So yes, I fully agree with you that this doesn't make any sense whatsoever and it HAS to be related to an OS or an external event but it happens with nothing connected to it.
I can only think of mains. Maybe there is something on my mains supply that happens at 22:30 or whereabouts but I don't see or experience anything around that time, I don't have anything happening at that time. I live in the UK, mains power is good.
I am puzzled!
Considering your theory that a mains issue could be the cause you could take a look at
gridwatch to see what happens around 2230h. Maybe you have access to or can borrow a battery like
this or a similar one and test it connected to that. If the issue goes away that would strongly support your theory of mains being the issue.
If I had to guess I'd say a mains related issue is unlikely in this case, I'd rather consider something thermal, e.g. your heaters go to energy save mode and your room temperature drops by one or two degrees triggering the issue. Maybe you can experiment with a hot air station/hair dryer and cold spray to see if you can reproduce the issue reliably.