Getting a competing offer is still the way to get leverage for better compensation, although the downsides of accepting a counter-offer are fairly well documented.
On the topic further up the thread about profit: engineers are paid based approximately on replacement cost, but profits are created based on market opportunity and scarcity. A company can create an offering that's hard to reproduce (a monopoly) - harder than most individual engineers' skills are to reproduce - and the excess profits are effectively windfall profits until the market corrects and competition sprouts up. Thus a company can charge closer to the value it adds to the customer, rather than closer to its cost base. Ideally an engineer would try to do the same thing: charge based on the value he or she adds, rather than how much he or she can make elsewhere.
And bringing it back around, companies can eventually get a windfall cost saving / profit from long-serving engineers. Because of accumulated knowledge, they can become such a good fit for the company that the company can pay them substantially more than the market rate, but nowhere near how much value they add, simply because they know that they're the only customer: monopsony, the inverse of the monopoly situation. To extract more value in this situation, you need to bring non-monetary aspects to the negotiating table. My preferred one is ownership: not autonomy, but actual capital interest in my output.