Pattern avoidance in compositions and powers of permutations (Discrete Mathematics & Theoretical Computer Science, 2026)