Minimising worst case waiting time, one can not do better than the number of nights presented by others.
One can not safely lower by one night, since the person going second then only has
4 nights to pass their information. That means of the log2(100000)/4 bits of information per night, which is more than 4 bits, requiring on average more than 16 states to choose from per night. That means they need to have "most" of the marbles in their possession each time its their turn to pass the bag. This isn't compatible with the other person having to share their piece of information in 5 nights, which requires "almost half" of the marbles to share an average of 10 states per night.
So with the worst case being the already established bound, the only improvement is to make a scheme that short circuits in some cases.
Updated scheme
The main idea is the one of @Retudin:
Person A keeps 0-9 marbles each of their nights, encoding the code in base 10 in five nights. Person B keeps 0-11 marbles each night, encoding a base 12 number. After night 8, the first 13530 codes of the base 12 number are "final" codes, and we at at night 9, otherwise we need the 10th nights to distinguish between the remainders. Average, 9.865 nights
Now, this can be combined with the idea of:
Person B keeping more than the maximum of 11 they are suppose to keep. Each extra marble, up to keeping 19, corresponds to small range of codes that can be bailed out on night 9, and a new set of rules of how the remaining days should be coded.
Of course, person B can't always keep more marbles, for instance A may have kept 9 marbles to code their first digit, leaving B with no other option than the original 0-11 scheme. Or A has kept 8, so B only has the option to keep 0-12, and so on.
Keeping 12, 13, 14... corresponds to the following updates number of stattes each person can keep the next nights up to night 9 (A|B)
12: (1452 codes)
9*11*11*10|11*11*12
13: (1331 codes)
8*11*11*11|11*11*11
14: (1210 codes)
7*12*11*11|10*11*11
15: (1000 codes)
6*12*12*12|10*10*10
16: (810 codes)
5*13*13*12|9*9*10
17: (576 codes)
4*14*14*13|8*8*9
18: (343 codes)
3*15*15*15|7*7*7
19: (100 codes)
2*18*17*17|4*5*5
20: not worth it
The number of "final" codes also changes for each, in tabular form:
[14150,14150,14141,14110,14057,13984,13893,13783,13662,13530]
Final efficiency
9.814 nights
/end new scheme
Initial scheme below:
The first night, person A keeps 0-11 of the marbles, as person B only needs a minimum of 9 marbles to encode digits in the canonical way. Keeping 2-11 marbles is simply a digit +2, and the scheme continues as usual.
If on the other hand person A keeps 0 or 1 marble, they signal to B that they can take the opportunity to encode the code they know in only four nights. The scheme is then a new one:
Person A:
Has one of the 512 first codes. They will only send the 0 or 1 signal the first night if this is the case. In the following four turns, A will keep 0-3 marbles each night, encoding their code in base 4 with the initial 0 coding the first 256, and an initial 1 coding the next 256. This leaves 17 marbles for B each night
Person B:
With their 17 marbles, they encode their code in base 18, just barely covering the 100000 combinations in four base 18 digits. This always leaves 3 marbles for person A to perform their part of the scheme.
As this special cases only a small range of the numbers, it only reduces the expected waiting time to:
9.995 nights
One must hope the ~7 minutes saved is enough to clearly explain the much increased complications :)
A second, and larger, source of redundancy is perhaps easier to recover.
B could also use the extra two states (since A only needs 9 marbles) to signal that they don't need the last night, for instance by using them to encode double 0's or double 1's in their code, meaning they get one digit ahead. This is 6354/100000 codes
Bringing the expected time down to
9.932 nights on average
/end old scheme