Probability of correctly declaring number as prime
For very large numbers we can estimate the probability as follows :
Let $N$ be the given number , then $M:=\frac{\ln(N)}{\ln(2)}$ is the limit of trial division.
Denote $$P:=\prod{\frac{p}{p-1}}$$ where $p$ runs over the primes upto $M$, if $M$ itself is very large, we can approximate this as $$P\approx \frac{e^{-\gamma}}{\ln(M)}$$ where $\gamma$ is the Euler-Mascheroni-constant.
Then, the probability that we have a prime, if no factor is found, is roughly $$\frac{P}{\ln(N)}$$
For numbers $N\approx 10^{99}$ , we get about $4.6$%