Yup. Sounds like you’ve already got this part down. The key is making sure everything hits the same tax year so the long-term losses offset the short-term gains.
I do something similar, though more in IRA’s. I’ll even use it for calculated trims or adds around core positions. For instance, if I thought “yeah, I’d trim some NVDA at $175”, I might sell a covered call for a strike plus premium totaling $175 or above. I’ve also thought “yeah, I’d add a bit more NVDA at $160” and sold a cash covered put at a strike minus premium totaling $160 or less.
The key is being willing to trim/add the shares if the strike price hits. I’ve been pleasantly surprised at how much I’ve been able to collect in premiums over the years while waiting for an trim/add to hit at my target price.