I don't see what static site generation has to do with it. You can spin up a huge number of shims even more easily with a dynamic site and a DB with a list of all the messages you want shims for.
The difference in speed between running a simple script and reading a file is not large enough to noticeably affect SEO.
Most of these sites are probably just using PHP, not any static site generator.