I do this a fair bit while traveling so I can pack lighter. In urban settings, I just use the hotel sink or a waste basket. For the backcountry, I'd use a Sea-to-Summit dry bag.
I find it is less about the kneading and the agitation and more about time. Sure, swishing it around helps and I do a bit of that, but that could be kicked the trash can very time a commercial comes on the hotel TV, rolling it around once a minute during a lucnh break, or walking down the trail for a mile with it.
The window is cute, but completely unnecessary.
What is super helpful is a modern detergent. I'd use Tide Ultra for front loading machines. It is highest rated by Consumer Reports, available everywhere (99 cents for a small box in a laundromat), and designed for this application – a small volume of water with less vigorous agitation than a top-loading washer does. Very small quantities are very effective. A "single load" box would do 10 loads in such a dry sack. It is slightly alkaline, so don't hand-wash clothes with it a lot (stir with a stick or rinse your hands afterwards).
And don't dump the dirty water in any sensitive areas which include being near surface waters, in high-altitude / high-latitude settings or along trail corridors. In a removed and temperate area, I would feel fine about discarding it in a shallow hole. Septic systems discharge the same (and worse) all the time.