Is it normal for this folder to contain 1M folders? How do you clean this up? I need to move my site to new storage and it is taking too long to copy all these small files.
It is not, there was a fix that was included the March 2019 Service Pack (TE-14151) to correct the issue with the uifiles regenerating too often (they should only generate a new set when a change is made to the theme. You should be able to ignore this folder when copying your site storage, it is a cache folder and the data will be regenerated once the site is running again.