America lives of a constant influx of the best global talent and a global market for its products.
I would bet my money that American democracy would not survive when that ecosystem collapses, especially not as the American system has already transitioned into an anocracy according to some. Collapse in itself would create opportunities, but not for a simple programmer as you refer to yourself.