A "cryptex" works like a combination lock. About the only relationship to math would be that you can show how many different combinations it takes to brute force it. Brute force = "break" it by trying all the combinations.
I don't think it's a very interesting math fair project. You could essentially just bring a 4 wheel bike lock and show that.
But you're leaning into right direction. Some simple variant of an Enigma machine could be readily built using components you'd find at any hardware store, so perhaps that'd make more sense?