I mean, that's what we want to believe, that it all started with someone feeding a hungry wolf, but knowing humanity it's just as possible it started with a captured wolf and copious amounts of animal abuse.
It's most likely that dogs/wolves just kept eating our waste, staying close to us, and after initial fights humans noticed the dogs/wolves are not being a threat, thus letting them do their thing and observing them.
Then humans eventually figured out that by observing dogs and their reactions, they could see if dogs smelled/heard something which they couldn't. And then started to exploit that.
You may wanna edit this to say trash, it sounds like you're saying wolves followed us around eating our shit, which afaik isn't a theory for dog domestication.
That is mostly how it works now; words change meaning. Nobody I know says 'trash can', it's 'garbage can'. But yeah, they originally meant different things
Well... it actually is a theory. Like, all modern dogs love to eat human shit, so there's been some evolutionary theories about how wolves/dogs of old have eaten human shit as an easy meal and thus part of their diets, and that might have aided in domestication and all that.
And now that I've already started to discuss dogs eating shit: My personal theory is, that rural dogs in India have human shit as a major source of their nutrition, since the sanitary conditions in many rural areas there are shitting in the bushes, and there's a lot of village dogs...