Agreed on all counts. Especially business size. Larger businesses find it harder, especially if the employee has been there 10 or more years. Sometimes the administrative overhead and time/money spent to get rid of them is more than the cost of keeping them employed.
I worked for one of the largest French companies, and you would occasionally come across people who have effectively been "boxed". They exist as an employee, draw a salary, get pension/health insurance, all the usual benefits, but do almost no work, and what they do is menial, generally boring and not really of any use to the company ("make work" essentially).
Effectively it is a competition, between how boring the company can make the work until the employee resigns, vs how much the employee can tolerate. They are usually placed in some (usually run down) office block away from the major work, and left to their own devices. One such lady had been like that for 10 years already, and had turned her office into a little garden, she would tend her plants during the work day. One guy I met was running an online side business from his work office, as he had so much free time between the menial tasks he still had to do.
As a newish employee, I was never offered full employment, just the "CDD" which was a fixed term contract, usually 3 month rolling, with no real protection (as you were technically a "contractor", not an employee), as were all my peers.
That is how it stays until a permanent employee retired, resigned or died, at which point there would be a scramble to apply for the position (and the fight to get it afterwards).
This goal was jokingly referred to as the drive to "become part of the company furniture", because it was so hard to get rid of you once you became permanent. It is still very much a "job for life" kind of set up in France, especially in the large enterprises there.
It reminds me a lot of how I heard things work in academia, especially when a tenured position becomes available.