Align origin and axis to custom vertices
Here is a solution:

In Edit mode select right vertices.

Go to Transform Orientation - Plus icon to create new orientation based on your selection




Back to Object Mode check ‘Origins’ box



In Object Mode use ‘Align to Transform Orientation’ operation



Enjoy!


I hope it was useful! Happy holidays everyone!