That is pretty much unavoidable these days.
The software can do things and in a more flexible way than straight hardware, but the software needs hardware to run.
LM339 is a quad comparator 3 sections unused in your diagram. An LM393 is a dual and could be used to give a warning (LED) and cutoff at different voltages. Still need a transistor either as a relay driver or (MOSFET) switch