On (1) the optimal strategy to maximise the expectation of your final net worth is to be everything you have all the time. With probability $\frac{1}{2^{100}} \approx 8 \times 10^{-31}$ you will end up with $100 \times 3^{100}\approx 5 \times 10^{49}$; otherwise you end up with nothing. So your expected final net worth with this all-or-nothing strategy is $100 \times \left(\frac32\right)^{100} \approx 4 \times 10^{19}$ despite the overwhelming likelihood that you will end up with nothing; whatever happens, the final outcome will not be close to the expected final outcome.
If instead you bet $\frac14$ of your net worth at each stage as a Kelly Strategy, your expected final net worth is $100 \times \left(\frac98\right)^{100} \approx 1.3 \times 10^{7}$, much less than the all-or-nothing strategy, even though with the Kelly Strategy you are very likely to end up ahead and quite likely to end up with something large.
On (2) the position is reversed. The all-or-nothing strategy gives an expected outcome for $\ln(100+N)$ of $\frac{2^{100}-1}{2^{100}} \times \ln(100)+\frac1{2^{100}}\times \ln(100+100\times 3^{100}) \approx 4.6$, rather less than less than the $\ln(100+100)\approx 5.3$ expectation if you were not to bet anything ever.
But betting $\frac14$ of your net worth at each stage would give an expected outcome for $\ln(N)$ of $\ln(100) + 100 \times \frac12\left(\ln\left(\frac32\right)+\ln\left(\frac34\right)\right) \approx 10.5$ and then expected outcome for $\ln(100+N)$ would be very close to this. This Kelly Strategy is much better for this expectation than either an all-or-nothing strategy or a never-bet strategy: note that $e^{4.6}-100 \approx 0$ while $e^{5.3}-100 \approx 100$ while $e^{10.5}-100 \approx 36000$.
The point of the Kelly Criterion is to maximize the expected geometric growth rate -- not the expected arithmetic return and not the expected terminal wealth. Your reasoning about computing expected values is not incorrect, but it is not what is used in deriving the Kelly Criterion.
With fractional betting, the wealth $W_n$ after $n$ rounds is
$$W_n = W_{n-1}(1+fX_n),$$
where $f$ is the fixed deterministic fraction and $X_n$ is a binary random variable such that $p =\mathbb{P}(X_n = +1)$ and $q= 1-p = \mathbb{P}(X_n = -1)$.
The expected wealth after $n$ rounds conditional on the wealth after $n-1$ rounds, $W_{n-1}$, is
$$\mathbb{E}(W_n\,| W_{n-1}) = W_{n-1}\left[p(1+f)-q(1-f) \right],$$
and for $f = 20\%$, $p = 60\%$ and $q = 40\%$ we obtain
$$\mathbb{E}(W_n\,| W_{n-1}) = W_{n-1}[0.6(1+0.2) +0.4(1-0.2)]= 1.04W_{n-1}$$
This is similar to what you derivived as far as it goes.
Derivation of the Kelly Criterion
The Kelly Criterion is derived by maximizing the expected geometric growth rate
$$\tag{*}\mathbb{E}\left[\frac{1}{n}\log \frac{W_n}{W_0}\right],$$
which is not the same as
$$\frac{1}{n} \log \frac{\mathbb{E}(W_n)}{W_0}$$
The terminal wealth after $n$ rounds is
$$W_n = W_0\prod_{k=1}^n (1+fX_k)$$
Taking the logarithm of both sides we get
$$\log W_n = \log W_0 + \sum_{k=1}^n \log(1+fX_k)$$
Whence, for independent and identically distributed $X_k$,
$$\mathbb{E} \left[\frac{1}{n}\log \frac{W_n}{W_0}\right] = \frac{1}{n} \sum_{k=1}^n \mathbb{E}[\log(1+fX_1)]= \mathbb{E}[\log(1+fX_1)]\\ = p\log (1+f) +q\log(1-f)$$
To find the maximum, take the derivative with respect to $f$ and equate to $0$. The Kelly optimal fraction will be $f^* = p-q$.
Resolution
With a fractional betting strategy we always have
$$\mathbb{E} \left(\frac{W_n}{W_0}\right) = \mathbb{E}\left[\prod_{k=1}^n (1+f X_k)\right]= \prod_{k=1}^n \mathbb{E}(1+fX_1) = (1 + (p-q)f)^n$$
and, hence,
$$\tag{1}\left[\mathbb{E} \left(\frac{W_n}{W_0}\right)\right]^{1/n} = 1 + (p-q)f$$
To maximize (1) we would choose $f=1$ (betting all accumulated wealth on each round) and we would get $\mathbb{E}(W_n) = W_0(1+p-q))^n$. However, there would be a minuscule probability of attaining this wealth as the probability of ruin is $P_{\text{ruin}} = 1 - p^n$ which approaches $1$ rapidly as $n$ is increased.
However, (1) is not the expected growth rate that is maximized by Kelly Criterion. That would be
$$g(f) = \mathbb{E}\left[\log \left(\frac{W_n}{W_0}\right)^{1/n}\right], $$
which is maximized with $\text{argmax }\, g(f)=f^*=p-q$ and
$$\mathbb{E}\left[\log \left(\frac{W_n}{W_0}\right)^{1/n}\right] = g(f^*) = p\log(1+f^*) + q\log(1- f^*)$$
It is true that with the optimal betting fraction,
$$\exp\left(\mathbb{E}\left[\log \left(\frac{W_n}{W_0}\right)^{1/n}\right] \right)= (1+f^*)^p(1-f^*)^q,$$
but this does not mean $\mathbb{E}(W_n) = W_0[1+g(f^*)]^n$.
Best Answer
You have an error in your code.
The logarithmic growth rate for $k$ bets with optimal fraction $\ell^*$ is
$$B=\frac{1}{k}\log\left(\frac{W_k}{W_0}\right) = \frac{1}{k} \sum_{j=1}^k\log(1+ \ell^*X_j),$$
where $X_1,X_2, \ldots$ are independent and identically distributed Bernoulli random variables with $P(X_j = 1) = p = 0.55$ and $P(X_j = -1) = q=1-p = 0.45$.
The expected growth rate is
$$E(B) = \frac{1}{k} \sum_{j=1}^k E[ \log(1+\ell^* X_j)] = E[\log(1+ \ell^*X_1)] = p\log(1 + \ell^*) + q\log(1 - \ell^*)$$
Note that the expected growth rate does not depend on $k$.
The variance of the growth rate is
$$var(B) = E(B^2) - [E(B)]^2 = p[\log(1+\ell^*)]^2+ q[\log(1-\ell^*)]^2 - [p\log(1+\ell^*) + q\log(1- \ell^*)]^2$$
For the given parameters we have
$$E(B) \approx0.005008,\,\,\,\, \sqrt{var(B)} \approx0.099832 $$
Your simulation generates a sequence of $k$ bets, computes the growth rate for the sequence and then repeats the process $n$ times. In the end, you compute the average of the growth rates for each sequence. Since the expected growth rate is independent of the length of the sequence you are effectively sampling the random variable $\log(1+\ell^*X_1)$ a total of $n \cdot k = 20,000,000$ times and computing the mean. The standard error of the estimate should be
$$SE = \frac{\sqrt{var(B)}}{\sqrt{nk}} \approx 0.000022$$
In fact, as $k$ is increased the distribution of $k$-bet growth rates approaches a normal distribution asymptotically by the central limit theorem.
This suggests that in many repetitions of the simulation the estimate of the expected value should be roughly $0.005008 \pm 2.32 * 0.000022 = 0.005008 \pm 0.000052$ with $99 \%$ confidence.
I ran the simulation myself and obtained estimates consistently close to $0.005$ using different random number seeds with only $100000$ simulation paths.