It has been a worry and under discussion for some time. Here is Elon Musk in October, 2020.
This is his reaction after the launch.
The static test was conducted at 50% of full thrust and the damage was considered to be erosion and acceptable. This launch used (based on numerous reports, but nothing I’ve seen directly from SpaceX) 70% thrust, and the assumption was that damage would be acceptable. They were wrong.
Today’s (2023-04-27) post, “NASA’s Crawler-Transporters”, discusses the massive civil engineering project NASA had to undertake to build launch pads with flame diverters and trenches at a location in Florida where the water table was right beneath the surface. The situation at Boca Chica is almost certainly about the same, and SpaceX gambled they could avoid the massive pyramid-building-scale project with “FONDAG” (calcium aluminate refractory cement) and, later, a water-cooled steel plate.
This may have been an expensive misjudgment, and may cost much more time than iterating changes in the rocket. I’m sure they’re looking at lots of alternatives, especially since they now have large sunk costs in a launch facility in Florida which also assumes no need for a flame trench.