Your page loads MathJax several times, once explicitly via the script
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
and once implicitly via
<script src="css/latexmathjax.js"></script>
since this script injects a script call to load MathJax.
This is made a bit more complicated by the fact that latexmathjax.js loads MathJax from the old CDN, and that copy of MathJax in turn injects another script to load MathJax from cdnjs.
All of these injected scripts load asynchronously, as does your explicit one, since you have "async" specified in the script tag. That means that the order in which they run will vary from page load to page load, and may be affected by caching, as you have noticed.
I have not investigated the issue closely, but I do note that during the times that the math is processed, the latexmathjax.js file seems to run first, and when it doesn't, the MathJax copy seems to run first. This makes sense, because the original latexmathjax content is in a <pre> script, which MathJax would skip (if it ran first), but latexmathjax replaces those <pre> tags with their (modified) contents so that MathJax can process them later. But when MathJax runs first, it skips the <pre> tags entirely (so no math in them is processed), and then latexmathjax runs replacing the <pre> tags, and loads MathJax.js again. But MathJax.js does not run twice, even if loaded a second time.
So the order in which things run makes a big difference, but you have no control over that when using the async attribute and script injection, so you get one result sometimes and another result other times.
I would recommend removing your explicit <script> tag that loads MathJax.js, and let latexmathjex do it, as that will make sure MathJax doesn't run until after latexmathjax has done its job. But you might want to modify your copy of latexmathjax.js in order to load from
cdnjs.cloudflare.com version rather than
cdn.mathjax.org, since the latter may be removed in the future.
See if that doesn't resolve your problem.
Davide