First thing that comes to mind is ye olde cheap opamp and a potentiometer. This aritcle claims hysteresis can be done with a resistor. Opamp output is not meant for relay, but it can control a transistor which in turn can control your relay just fine.
Edit: i’ve just re-read your post, there’s no need for relays if you have low voltage, just get a transistor rated for more than 5V and make sure it wom’t overheat.
Ppl do it with UV LEDs and they claim it works. I never tested it, i’m dried-a-cactus kind of guy.