My advice is: invest money into better law enforcement, including ML and AI-based, like crime prediction and drones. Make sure, by a combination of legislative and informal methods, that poor and well to do communities are better separated from each other. Invest more in stuff which gives poor people something to fill their time with, like video games, so they don't do as much crime. And that's it.
Why not invest money in education, training and a social security net that gives poorer individuals the means and space to catapult themselves into wealth?
As for fortress thing - you are exaggerating. There isn't so much crime around these days, much less than 30-40 years ago when things were still going fine according to the article.
In the end, it's just the technology change. 40-50 years ago uneducated masses who were members of solid middle class have been factory workers. They are automated away. There isn't anything which could be done about this. Besides, exactly 40-50 years ago, during Jimmy Carter era, same things were said about farmers who found themselves displaced with great improvements in farming productivity. History just repeats itself.
And yes, classes must be sustainable and moving between them should be difficult, only through exceptional personal (genetic) abilities and a lot of effort. Otherwise they are not classes, just people gambling and some of them winning.