How to find extremely large BigInt prime numbers exactly in JavaScript?

You do not need to check if the number is exactly a prime. There is a probability that a bit in your computer flips, because of stellar radiation for example. This is very unlikely but as long as it is more likely than that the Rabin-Miller test marks a non prime as a prime is lower than you should be alright.

So a hardware failure is more probable than that the number is not a prime, you couldn't ask for more from a prime test.