Why don't you write your custom folder elsewhere? Like inside /data? What did you put inside this folder that can't be re-generated after? A cache folder should improve performance, if you remove stuff inside, it's shouldn't break your app.
The cache directory has a different purpose. You should not write your custom files to folders like cache, logs, components, vendor because they are overridden while running some commands or while running the application.
customfolder elsewhere? Like inside/data? What did you put inside this folder that can't be re-generated after? A cache folder should improve performance, if you remove stuff inside, it's shouldn't break your app.