I think you misunderstand what a daemon thread is.
See what is a daemon thread in java
In summary, it basically means that a daemon thread shouldn't be doing any I/O or holding any resources. If you are contravening this basic rule then your thread doesn't qualify being a daemon thread.
Adding a shutdown hook is the standard way of ensuring your code gets invoked prior to JVM termination, but even this isn't 100% guaranteed - your JVM could crash for example, leaving the OS to tidy up resources in a way which protects the OS, but quite likely leaves your application in an inconsistent/erroneous state.
System checkpointing and recovery mechanisms go back to the early days of software (operating systems and batch operations for example), and unfortunately, this wheel keeps getting re-invented as there's no "silver bullet" approach (API) which tackles this problem in a generic enough way.