A standard practice in Buddhism is to cultivate compassion and loving-kindness (2 of the 4 Brahma-vihārā). In relation to 'idiots', the practitioner benefits from remembering that idiots are 'victims' of idiocy, victims of ignorance: the 'idiots' did not actively, mindfully, choose to be thick, in perfect awareness of the consequences of such a choice… And it's important not to blame victims!
Yet, this practice can be hard sometimes, and just like it's hard to give rise to compassion vis-à-vis murderers, it's hard to give rise to compassion vis-à-vis people who knowingly put others at risk, for selfish unessential reasons.
Thus, it can prove hard not to wish on those who stupidly ignore the confinement (specifically requested by experts on infectious diseases, to help save lives during the coronavirus crisis) that they catch the virus —and possibly even die, in horrible torments, from it. This would just feel 'just', 'fair'; this would feel like karmic retribution, too.
Now, several discourses by the Buddha highlighted that karma is not so straightforward.
To start with, one bad deed lost among many good deeds isn't expected to necessarily yield to the same outcome as a very similar ('same') deed lost among many other bad deeds would: that's the simile of a small pot of salt, thrown in a glass of water or thrown in the Ganges river… Same quantity of salt, not the same resulting saltiness.
Vis-à-vis 'idiots', however, the practitioner will easily feel that "well, that's clearly not an isolated incident, here… so bring the harsh punishment on!" Not only this would fail at remembering not to blame victims of idiocy, not only the practitioner would develop unhelpful habits (blame games, finger pointing, etc.), but also this would highlight some ignorance.
The person not staying home, for selfish unessential reasons, might very well pile up bad karma this way indeed, and might pile it up on top of much bad karma already accumulated… In no way this would guarantee a specific outco… … … …