If I look at your examples and counterexamples I would see APE seems in the most general form to be the following:
Aligned Pairs Rule: Two buddies cannot duplicate the contents of any two-candidate cell they both see.
In this form it stills work in sudoku variants. Consider for example the cages in killer sudoku.
This rule could be generalized to a Aligned Set Rule, where we have a set where each cell sees each other.
XYZ-wing in the form which is independent to the sudoku variant is:
If three cells a, b, c, with a and b are buddies and b and c are buddies, with candidates xy, xyz and xz respectively, then x can be removed from the candidates of all cells (different from a,b,c) contained which can see a, b, and also c.