With a little of handholding and outcome motivation management, you should be able to hack into their dopamine cycle, keep their interest and those deliverables coming.
Once they've been notified that they're underperforming, try to help them out. If they can't be helped, fire them with well-documented cause (their history of poor performance).
Eg, if bob was working well at WFH he'd do X, Y, Z, but he only did 0.3 of X. You could even compare that to other employees to show that it's just this one person.
Make sure you have good ways to measure work product. For example, you can see if people are pushing to git repos.
Set aside a couple of times where people are required to log into chat or voice room every day. Have them type in a report on what they are working on and be available during that narrow window to answer follow up questions.
I worked at a company which had a similar approach to the one being considered , i.e. force everyone in. Every decision there was based on the lowest common denominators. This meant that the really good high performing people all quit. It's a ghost town over there these days.
Set expectations, support people with meeting them, fire them if they continue taking the piss. Don't ruin it for all of you high performers because you can't be bothered going through the process to fire someone. You'll have better overall performance, satisfaction, and retention if you work to get the slackers either performing or out.
I also have slow days where my energy is low, and intense days where I work longer than normal. People are not machines. Regardless, I get all the things that need to be done done, and usually a bit more on top.
You should measure productivity, not laptop utilisation.
It seems to me that if they are working few seconds every 20 minutes, there should be drop in their actual productivity. If these people have half functioning managers, they should be able to figure that out.
Dismissing people for having almost no output is dismissing for a cause.
We casually observed there seemed to be a split in employee WFH performance, with most performing as expected or better when WFH, but a minority performing MUCH worse. That is, significantly less than 50% of the productivity they have while in the office.
We've had casual one-to-one meetings with those individuals, and while a few will sort themselves out, most just flat out deny a difference. So we resorted to adding some very basic anonymised monitoring tools to a random subset of staff laptops (hence throwaway account).
What we found was that the majority are indistinguishable which days they are working from home and which days they are in the office, but a minority basically do no work when WFH. By this I mean, behaviour such as their laptop is idle for 20 minutes then active for a few seconds. As it's anonymised we can't be sure, but I'm guessing those are the staff we've identified as having a problem. I wouldn't be surprised if they had a second job.
The problem is: what to do about it? We're in the UK so just firing people without cause isn't an option. HR are saying it would be unfair, humiliating and potentially constructive dismissal if we forced the problem staff into the office but not everyone else. There's also a lot of valid discomfort and GDPR-related fear around the idea of installing heavy surveillance tools on laptops to collect evidence, and a concern that it will make for a hostile work environment. Even if we just used it very selectively on staff suspected to be breaking their contract, they would undoubtedly tell their colleagues which would lead to discontent. But without that evidence, it's very difficult to legally justify sacking someone.
The HR people are trying to force us back to the office because these issues are too challenging to deal with, but we (the tech team management) are trying to find a way to deal with staff who are taking the piss without upsetting everyone else in the process.
What's the play here? Genuinely looking for a good solution as, like many others, I personally enjoy WFH and don't want to have to give it up.