I agree with MarkStrassel. You need a unique identifier. If you can ensure that the [Record ID#] of the original ticket is always at the end of the subject line then you can have a lookup that defaults to the parent ticket.
For example, if your app has two tables: [_DBID_TICKETS] and [_DBID_EMAILS] where [_DBID_TICKETS] is the parent to [_DBID_EMAILS] you will have a [Related Ticket] field. You can have a formula field that searches for the characters in your subject line that come after the "#" character. So your subject reads, "Re: FW: FW: FW: App on fire! Ticket #123456"
Your formula logic starts like this:
Right([Subject], "#")
This returns everything after the "#" character
Then we compare this to the [Related Ticket]:
If(
Contains(
Right([Subject], "#"), [Related Ticket]),
True, False)
Now if this returns True, then apply the Right([Subject], "#") value to the [Related Ticket] field.
At least this would be how I would have started approaching this problem. Hope it helps get some ideas flowing.