Actually, I find that idea kinda funny and with some minor adjustments, I think it can be good parenting.
So maybe you don't want to throw the candy out of the window, because that is not the proper way to dispose candy. However, if you add an empty bag for you, where you put the candy every time the kids misbehave, the kids will probably learn how to preserve their stash. In addition, you might want to add some rules, how they can get the candy back which has landed in your bag (like every time you 'misbehave'). That way you would level the playing field and it might become a game.
After all, it is candy. Nothing the kids rely on to survive, but rather some pleasure drug.
So maybe you don't want to throw the candy out of the window, because that is not the proper way to dispose candy. However, if you add an empty bag for you, where you put the candy every time the kids misbehave, the kids will probably learn how to preserve their stash. In addition, you might want to add some rules, how they can get the candy back which has landed in your bag (like every time you 'misbehave'). That way you would level the playing field and it might become a game.
After all, it is candy. Nothing the kids rely on to survive, but rather some pleasure drug.