On the first page a user sees, presumably a login page, add the session variable.
Maybe something like
Session("loginTime") = Now()
Then on every other page add in some code that looks for that session variable and, if not found, send yourself a message. Maybe just log the event in some text file.
You can do this with a file you #include on each page. Maybe:
If Not IsDate( Session("loginTime") ) Then
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set log = fso.OpenTextFile( Server.MapPath("/writableDirectory/failures.log"), 8, True) ' 8 is append
log.WriteLine "Session lost on page " & Request.ServerVariables("URL")
log.WriteLine "Lost at " & Now()
... whatever else you want to log ...
fso = 0
So similar to your EscapedSession, but log what happened.
Quite frankly, I don't understand the point of your EscapedSession code.
Getting the session id from the database only sets that one session value. It has no impact on any other session values.
I hope you don't think that you can regenerate session information just by knowing the Session.SessionID. I don't think you do, as that's not what you are doing there, but...
I'd be sorely tempted to kill off that EscapedSession function. I can't see how it possibly is doing you any good at all.