You’ll want to animate the object via a bone rather than animating in object mode if at all possible. That will allow you to bake the result! To do that, create a new bone for the object and use a copy rotation bone constraint and you should achieve the same result.