To what you said above, both can be true. But it depends on the client's business.
I got completely crushed last time. But my clients were primarily in travel and fashion/lifestyle which both got hit hard early. And I was trying to bootstrap a social media startup at the time, which was also in travel. So I got destroyed.
Typically agencies and freelancers are the first to feel a recession. Vendors are more expendable than W-2 employees so contracts get stalled out or cancelled as soon as the warning signs hit the board room.
However... I've known of some people who actually did quite well last time around. Generally they were offering lower rates than the competition and specialized in maintaining software that was essential to recession-proof businesses (like entertainment, education, government etc). They had long-term contracts where they were essential to these businesses, and they lowered their rates to be competitive. This was eventually how I recovered as well.
Basically my advice is - prepare to shift from quality to quantity for a bit, diversify your client portfolio and put effort into building long term clients where you're essential.
This is a really interesting thought that I hadn't considered. I always hear to diversify your investment portfolio, but the thought of diversifying your client list is fascinating. It makes a lot of sense though.
If you look at any of the major consulting firms (ex: Accenture) that have lasted decades, you'll see that they have their fingers in many different unrelated areas and industries. "Niche" in the short term is a great way to build up clients, but stick narrowly to a niche over too long a time scale, and it becomes an anchor.
That said, I've seen companies shed permies over contractors in difficult times, because if you form the view that said difficult times will stick around for a while, the permies look worse as aliability/drain on your projections than having contractors which, although they are higher cost, can be shed trivially. Depends on location though, areas with stronger protections against letting go of permanent employees are the ones where organisations see those same permies as more of a long-term liability. In right-to-work states, for example, it's just as easy to shed either group.
I am sure there is some business angle for freelancers to do well in a recession but I can't come up with one.