Answer = No.
Ref. early < 1950. I'm excluding all Lego, Meccano, Mega Bloks and cam based machines for obvious reasons.
This is the Lorenz rotor stream cipher machine (very Steampunk):-
Colossus and ENIAC were built to aid decrypting this keystream. Those computers were at the bleeding edge of cryptographic analysis, and millions of people's lives were in the balance.
12 metal wheels went round and around to create the key stream. How could a electromechanical device of the Colussus and ENIAC era manage to execute 14 rounds of 256 bit keys? And create a key schedule? And perform substitution/transposition to instil confusion/diffusion? The machines could do frequency analysis and some Monte Carlo simulations.
An Arduino board can do AES but has 48,000 transistors for it's core and then extra for the memory and GPIO. It generates little heat, consumes ~ 25mA and nothing moves. Mine are 100% reliable if I don't stroke the cat before hand. Colossus had a reliability of 50%.
Plus and most obviously, they didn't have the cryptographic knowledge to design a machine for a cipher that wouldn't be invented till almost the 21st century. Also consider that the famous Difference Engine was built in the 1980's ( not designed, but materialised). It calculates logarithmic and trigonometric coefficients. Today, not in the early 20th century. It's still can't encrypt a tweet.
It's nice and romantic to think that they could do that so long ago (and I guess that's what the anachronistic Steampunk genre targets), but my answer is no.