How do you calculate the gain of a matched filter?
There is no single "gain" value for any filter. The value that you're referencing as the sum of the taps is its DC gain:

$$
H(0) = \sum_{n=0}^{N-1} h[n] e^0 = \sum_{n=0}^{N-1} h[n]
$$

where $H(\omega)$ is the frequency response of the filter at angular frequency $\omega \in [-\pi, \pi)$. What you are concerned about is how large the peak can possibly be when your matched filter lines up perfectly with your signal of interest. That's easy to calculate for a constant-envelope signal like yours:

$$
P = G \sum_{n=0}^{N-1} |h[n]|^2
$$

If the matched filter lines up perfectly with the signal you're looking for (both in time and in phase, which is the worst case for this analysis), you're effectively calculating the squared magnitude of each sample and summing them all up. Now, in any practical system, there will be some gain or loss factor $G$ that is not known a priori; this reflects the fact that you won't know the exact power level of the input signal as it hits your ADC. If you have an automatic-gain-control (AGC) loop, you could use its nominal output level to decide what $G$ is and therefore calculate the maximum peak $P$. Otherwise, you can design for worst-case values of $G$ to ensure that you don't overflow with the resulting value of $P$.