I'm sorry to disappoint you ... Your solution is only temporary ... After you've cleared the cache, Mojave has rebuilt the icon cache overnight and then the Finder can quickly open the folder. But then, continuing to use Mojave, the problem will be repeated again and again and you'll have to wait longer or... other nights to be able to view the folder contents with many large files and many custom icons. The problem is greater with external disks.
The only real solution must provide Apple, restoring the correct operation of the Resource Fork. In this regard, the solution provided by another user to delete the Resource fork through the Terminal is a permanent solution valid but, unfortunately, eliminating the Resource Fork, you delete the previews of images, videos, PDFs and other files created by Finder and then it is almost impossible to get them back. To do this, in some cases, you can use an application like GraphicConverter, select all the photos and with the right mouse choose to rebuild the EXIF Preview.
Although I do not recommend doing so, however, I tell you the command to copy in Terminal to solve the problem of opening folders to those of you who fail with other methods. Remember to replace the correct path name of the folders that interest you instead of 'INSERT-PATH-NAME-HERE'. Keep in mind that the command also deletes the Resource Fork sub-folders!
find INSERT-PATH-NAME-HERE/* | while read f ;
do xattr -d com.apple.ResourceFork "$f" ;
done