@gab81 & @ecdltf
It's not hard, but you need to have basic knowledge of htaccess. Here is the example code that need to added to your .htaccess file
# BEGIN 410 Gone
redirect 410 /wp-content/cache/autoptimize/js/autoptimize_xxxxxxxx.js
redirect 410 /wp-content/cache/autoptimize/js/autoptimize_12345678.js
# END 410 Gone
Change the "/wp-content/cache/..." with the url that causes 404 error. And make sure you have make a backup of the .htacess file. Because improper configuration in .htacess file can ruin your website and it's SEO.