How to Handle Going Backwards in Navigation When Referrer in PHP/JavaScript won’t work?

You could use cookies.
Set a cookie for each “level” (Messages, Series, Message) with the URL the user has last been on (including pagination). If no value is set for, say, Messages, because the user has jumped directly into Series, then you go to the default Messages URL without pagination – if a value is set, you go there.

It’ll never be perfect, if somebody uses multiple tabs (if your app allows that), they might be on page 4 of Messages in one tab and on page 5 in the next. Since cookies aren’t tab based, you wouldn’t be able to know in which tab they are click the “Go back” button. But I think it would be close enough.