That would get rid of Jehovah’s Witnesses, but I see little reason to think it was would necessarily be effective on salespeople.
If, for some reason, you’re unwilling to treat these worthless in-person spammers with the contempt they deserve, my suggestion is to remember that “no” is a complete sentence.
Replace the doorknob with one that incorporates a “storeroom lockset.” It’s like the normal entry lockset like you’d have on your front door, but there’s no button on the inside: it can always be opened from the inside, but requires a key from the outside every time the door shuts.
I use a storeroom lock to keep my kids out of my home networking closet. I’m thinking about putting one on the basement door, too.
(It’s not weird/exotic/expensive BTW; it’s just more common in commercial buildings than residential ones. It should cost about the same as a normal entry-lockset doorknob.)
See also: https://flyinglocksmiths.com/blog/the-five-lockset-functions/
For bonus points, install a door closer (or just a tension spring) to make sure it latches shut every time you walk away.
You could get a “smart” plug and use Home Assistant to monitor the energy usage and shut the plug off after the washer stops drawing power, but unless you already have a smart home setup that’s super overkill.