Replace 50k pot with arduino

You don't see any flickering of the lights any more above ~100Hz,
but you could see some strobe effect on moving items in the room (spread four fingers, and wave your hand).
I normally use the default 200Hz on LED drivers based on PCA9685 chips.
The default ~500Hz of most Arduino pins is just fine, but don't go a lot higher than that.
If you do, then the (low) dim range could suffer.
Leo..