I did it with my daughter once, after telling her several times to tidy her room. I threatened I would do it, but she didn’t believe me, so I went in there with a roll of bin bags and anything that wasn’t put away was put into the bin bag, tied and outside the back door. Next day was dustbin day when she was at school, and I tucked them away in the loft and sorted through them all properly. I gave her what wasn’t broken or rubbish back once she’d kept things tidy for a reasonable time. She did learn her lesson though, and I’d only to pick up the roll of bin bags after that and she’d do it properly! She still talks about it.
As a child, we learned as my Mum threw things out of the bedroom windows if they weren’t put away, and we’d come home to find the garden strewn with stuff!
My brother lost his marbles that way - Dad was digging them up for years 😳😂🤭