How can I animate a GameObject that isn't parented, but will need to be for the animation?

Hi, I’m working on a game, where the player collects trash. They drag trash cans up to a trash truck. There is an empty GameObject, with a Box Collider attached to it. Once the / a trash can is dragged up to, and inside, the collider, it detects this, and I will animate the trash can, being moved around, and shaken, having it’s contents dumped out, into the trash truck.
What I’m trying to do, is make it so that the trash can is parented to this empty gameobject, so that it can have a locally-placed(?) animation, no matter where the trash truck is. The problem is, it isn’t parented to the GameObject at the start, and it shouldn’t be. So how can I achieve this? Is this possible? Is there a better / alternative way of doing this, that I should consider?

If anyone needs any more information, please, let me know.
Thanks!

You can add an animation event to the animation of the trash can being shaken at the first frame of that animation then you can create a function in script that does what you want and set it to be executed at the animation the event, I think this is an easy way to do what you want.