Eight consecutive perfect shuffles will bring a 52-card deck back to its original order, with every card in the pack having cycled through a series of predictable
permutations back to its starting place. This holds true for any deck, regardless of its size, although eight isn’t always the magic number. If you have 25 cards, it takes 20 shuffles, whereas for 32 cards it only takes 5; for 53 cards, 52 shuffles are needed. You can derive a formula for the relationship between the number of cards in the deck and the number of faro shuffles in one full cycle.

Previously, I developed a MODEL solution for exactly 52 cards and exactly 8 iterations. Generalizing it seems doable in just
two steps:

STEP 1: Handle decks with odd counts. Pretty easy -- the first and last card never change position in a faro shuffle! I noticed it; Mr. Stone confirms it:

You can either weave the cards together so that the top and bottom cards stay in place—this is called an out-faro—or you can do what is known as an in-faro, in which the top and bottom cards each move inward (toward the middle) by one card.

I'm doing an "out-faro", so I can just ignore the bottom card. If it's an odd-number of card, I just round up to the next even integer and go through the same process, but ignore the bottom card at the end.

STEP 2, Modify the query to keep shuffling until the order is back to the initial order.
Based on my prior experience with exponential smoothing, that's
really simple.

Determining covergence is the key question. The usual statistical trick of looking for "sum of squared differences" equal to zero should be an simple criterion.