Watchdog for 'last seen'

For a simple watchdog where persistence over a restart is not required then this can be easily done using a Trigger node, set to send nothing, then delay (25 hours in this case) then send the failure message. In addition select Extend Delay if New Message arrives. The result is that once a message is received then if there is an interval of 25 hours with no message then it will trigger. You will need an Inject node feeding it (as well as your message stream) set to fire once on restart in order to prime it the first time.
For persistence over a restart then your idea saving the current time (new Date() will get that for you) and updating it each time a message arrives is the way to go. However you don't need to write logic to save it in a file, you can use Persistent Context to get node-red to save it for you. Search for node red persistent context and you will find it explained in the docs.