The steps are the same. First they pile on more work on you, then gaslight you in believing your workload is the same as a junior employee and/or is subpar, then take you on a journey of “helping” you improve, document every small thing as a major flaw and then get you in that meeting with the HR.
Most places I've been at will suffer with known weak developers for a long time because a weak developer with domain knowledge is still more productive than many new developers without it and there's always the risk the new hire will turn out to be a dud as well.
A lot of the comments here seem to use the term mental health days without irony quotes. A mental health day is not a psychological crisis. It is a plea for a timeout from the workaday grind.
I was interviewing at a company recently and they called out that they offer 1 mental health day per month, in addition to other benefits.
When you take a sick day, you're not supposed to say what's your issue.