Stability of job of a Patent Agent

Hi Everyone good morning . Recently one of my family member and one close friend was effected by Layoff . One of them was in Federal position and another one in private tech filed. I am feeling very sad and frustrated seeing their suffering .Specially one who went to Federal job left private sector just because Federal jobs are more stable. He is a family man with 3 kids and a wife who is under cancer treatment. The other person in Private tech field was a good performer. He just bought a house last year and was starting a family .He is also devastated .My whole week went on thinking about them and thought of what support I can provide them. Seeing both of their situation my question come out how stable is the job of a patent agent? Do law firm also do layoff? The law firms do not have stock price like tech company but still need to meet revenue. How brutal they are considering what is happening in Federal and private field this year?

Both of these persons are good human as much I know. They were also dedicated to their work as I seen them last couple of years . Could they do anything to prevent this ?

Feeling very down listening their stories :-(