CSS and HTML, even if you assume that they are equally complex as JS, have very different failure modes that make them more resilient. Too much JS is also a big problem in many other ways, such as costs and punishing constrained platforms such as mobile phones
The problem is that the industry does not agree and keeps ratcheting up the average JS payload and keeps hiring based only on skills in React and completely disregarding CSS and HTML