But maybe that "positive" effect do exist ?
While it's not a universal "no" to that.. it's pretty close and the overall effect is likely to be negative.
Let's assume the local jobs market for these people's skills is in reasonable health (i.e. the layoffs aren't as a result of a general tanking in the sector) and imagine you have three devs are intended to survive the layoffs,lay-offs: Timmy, Spike, and Johnny.
Timmy is a decent, competent dev, Timmy's not going to be laid off because he's doing good work for you. Unfortunately for the company Timmy knows this, so if the company attempts to instill fear in Timmy that more lay-offs are around the corner Timmy's best move by far is to jump ship. He knows he's pretty employable and while he's still got his current job he would be smart to look for something more secure. As a result Timmy is going to metaphorically have one foot out the door. Timmy is not going to be working harder/better for you.
Spike is mediocre, he's not bad but he knows he's no rockstar. Spike is smart enough to realize that Timmy is better than he is and therefore he's more likely to be laid off than Timmy. So for Spike it's the smart move to start looking now, rather than wait for the axe to fall - and the sooner the better since he knows that if Timmy ends up on the market he's going to be competing against Timmy for jobs. So Spike is not going to be working harder/better for you.
Johnny, well let's be honest Johnny isn't great. Johnny knows that he's going to be the last pick on the job market so he needs this job. Johnny is going to be terrified of being laid off - so he's going to try harder, the boss looks at a increase in output from Johnny and assumes the fear is driving him. So he keeps the fear going, after all if Johnny feels secure again he might start to slack! For Johnny though he sees the fear hasn't lessened, despite his hard work so he tries harder, and harder. But Johnny, bless 'im isn't blessed with an abundance of talent and an infinite capacity to work so he starts making mistakes. Mistake follows mistake which only serves to leave him in abject terror. Timmy and/or JohnnySpike leave and the fear and the pressure increaseincreases. Pretty soon Johnny is a quivering wreck who produces reams of garbage day in day out, the business never gets anything good done and delivery times slip, costs escalate and the company ends up in worse straits than it was before.
So for the meager "gains" of a short term boost to the productivity of the weakest member of the team the company has potentially lost two decent employees and is, in short, screwed.
So yeah my advice to your boss (or anyone thinking of fear as a motivator) is that it's a stupid idea that's counter-productive in the long run.
But what about special circumstances? Coronavirus and whatnot?
Well you might get people like Timmy/Johnny deciding that things are too volatile right now to move on - stability can be a great comfort when other things are flying out of control. But these guys aren't idiots - they will remember that when the chips were down they were exploited and treated badly. So they'll still look to jump ship just as soon as the market looks viable. Boosting productivity for a month or two only to tank it for the rest of the year is a bad trade.