I don't think there is an easy bandaid-fix. Something that might help though might indeed be some kind of automated logout after an extended period of time. Dunno, once you reach a continuous 12 hours you get a message you will have to logout in 30min latest or will get a system-logout. After this, you are free to rejoin the queue of course.
Guess 12 hours should be more then enough? And it would help with those that are online for 48hours + already due to macro usage.