Thanks @KarinaHTV - good to know.
Have just tested this and the original issue still persists with Heroku my side.
When removing the setTimeout from the workaround, the build no longer fails but the assets do not get built so anything using UI elements does not load within the app for me.
So, for now, have reverted back to my solution above!