Nothing magic or particularly reliable, but a few things stemming from the basics - layoffs happen because the accountants say there isn't enough money, and [Function X] seems to cost more than [Profit/Opportunity Y] that is assigned to it. Then a bunch of people have no job the next week. So to avoid being picked up in a layoff, it is helpful to talk to the accountants, figure out what Y is and what X you are in, and if the numbers aren't promising work to get re-categorised as a Z, increase Y or negotiate to change how things are measured.
Most product teams are organised around the idea that someone tells them what to build, then they build it. That means they never talk to anyone who cares about profit. Short-circuiting that and being in people's ear about "is this going to secure income?" can be good for everyone.
Is that sort of thing guaranteed to work? No, sometimes the hammer is too big and heavy to divert. But a lot of the time software people show no interest in whether the plans they are signing off on are going to be viewed as leading to more money.
Eg, in the original article I see things like "Occasionally, the VP of Product would message me directly to ask if a feature was feasible to implement". Cool. The VP of product isn't politically aligned [0] to put old mate on profitable features. He is going to potentially put old mate on features that are hard to implement, moonshots or potentially get someone to stop bothering him. So old mate build up a reputation for technical excellence (aka on track to Staff Developer), but not a reputation for being essential to making the accountants happy. Eventually parts of the business that aren't under VP Product's control sack him.
If an accountant thinks you are responsible for 1% of a companies revenue and your salary is less than that, your job is secure. Iron clad. Really have to screw up to get fired. So proactively talking to them and associating with things that push revenue up is a strategy. Negotiate to make it so.
[0] If he's a good VP he will be, but that isn't something that can be assumed.