With your example, there are a number of languages that can statically prevent thread safety issues entirely, so that's not actually a good example of something a type system can't catch.
To be honest, there's much more that can be statically enforced by a type system than what C++ is capable of. With a sufficiently powerful type system, it tends to become more about tradeoffs in ergonomics and type safety.
Uh, there's still a shitload of websites out there doing SSR using stuff like PHP, Rails, Blazor, etc. HTML is alive and well, and frankly it's much better than you claim.