How can I measure how long a ticket sat with the last group before the ticket was solved?
Yes. See this article section: Calculating how long tickets sit with their last support group.