AI usage will directly impact said margins. Moreover, for the scenario you describe, companies need to have the capability to precisely estimate the cost of a given deliverable - not something possible with current tooling + models. You're also underestimating the market trend towards vertical integration: companies are not going to be constrained by a sector or niche. They will expand to capture as much value as they can, because now their capacity to do so is partially decoupled from labor.
It will certainly be a cutthroat landscape for engineers, but companies will be building _more_ capacity, not less. In other words, the demand won't disappear for skilled technical labor, it will just move higher up the value chain.