The number of recent layoffs make it clear that there are plenty of people perfectly capable of performing even your pretend scenario. See eg http://layoffs.fyi/ and also eng layoffs at Uber, Samsara, etc.
Well, then the government in the USA is wrong, because they wrote that the Immigration and Nationality Act, section 101(a)(15)(H) is for foreign workers in specialty occupations, especially due to the need of skills that are urgently needed by the country.
Also, those mass layoffs you reference are rather recent and doesn't seem to have anything to do with this specific visa system. At the same time, the pool of available people might suddenly exist now, and that means that a company that needs someone with those skills now has a native worker available instead of having to search for people elsewhere. H-1B workers that were laid off have to exit the USA so it's not like they will add to that pool.
That said, it is still possible that those laid off people were selected to let go because their stills aren't as needed as others inside that company (i.e. positions that only exist due to scale). That doesn't mean those people happen to be the ones that you'd need to seek someone else for. Assuming that all tech people have identical skills doesn't help the conversation.