Reverse Ligatures

So I’ve made a font with a lot of Ligatures. I have A_B, A_C, B_C B_D, etc… However I want A_B and B_A to be the same glyph. Is there a way to get the program to automatically do that instead of having to do it by hand?

Thanks!

Generate glyph with A_B=B_A as recipe.

Instead of duplicating the glyphs, I would write the extra lines of feature code.
so for each line

sub A B by A_B; 

you add add one:

sub B A by A_B;