How to realign two exact same meshes with different transform orientations?

My suggestion is similar to @moonboots solution, but automate with free addon keKit


if both have the same polygon