IHGM is a mod for Minecraft 1.19.x that does one simple thing for server owners.
Whenever there's no players online, IHGM will attempt, in a very hacky simple way,
to pause overworld's daytime ticks.
This basically means that when no one is online, time won't progress, meaning on small 24/7 servers, the days (and potentially difficulty) won't skyrocket. This is absolutely great for survival Minecraft servers with small player counts and mixed activity.
I have no idea!
But in seriousness, this shouldn't do anything, hopefully, but there might be some funkiness with mods that rely on daytime ticks in some way. Caveat Emptor. This was tested on a 1.17.1 server, so make of that what you will.
This mod is small (And CC0!) so you're more than welcome to try and port it yourself.