One big "off-label" use of stack traces for me is to determine the caller method of the current method. I use it in a lightly customised log function to also log the name of the method that has emitted the log.
If I understand your use case, most loggers (like Logback) have the possiblity to automatically include the name of the method that called the log-statement.
Logback even supports including the call chain in the output, so you could include the parent method, grand parent method etc. This probably uses reflection, so it could have a negative impact for applications that need a high performance.
https://docs.oracle.com/javase%2F9%2Fdocs%2Fapi%2F%2F/java/l...