A legacy COBOL code base that runs on expensive and proprietary hardware doesn't sound like a big enough problem?
It is quite likely NOT running on legacy hardware though.
COBOL codebases are actively updated, maintained, and expanded.
Instead of wholesale rewrites (which is high-risk), one strategy is adapting a COBOL code base to interact with other cloud software.
Sure there might still be some CNC machine or proprietary interface that exists, but this is so far in a tiny minority that its not economically viable to pay attention to