It isn't necessarily bad for SEO. You want to be careful of "sneaky redirects" (see https://support.google.com/webmasters/answer/2721217?hl=en), but this type of behavior should probably fall in acceptable territory.
Honestly, from an SEO perspective, you'd be better off redirecting the broken URL to a legit page on your site via a 301 server side redirect. That way you aren't in sneaky territory at all and that way, too, you are helping get people who click on a search result to a better page on your site.
All that said, the bigger concern in doing this is not anything to do with search, it is that this type of redirect can be particularly bad for users. In my research, these types of error pages that have some kind of automated redirect actually cause a considerably higher exit rate after people encounter the error. You are usually much better off leaving people on the error page and making the sure the error page contains links to other pages they want to go to.
The ideal answer for users is to implement a server side redirect so that people just go to a relevant, working, non-error page on your site and never actually see an error. This ends up being good for SEO too. So, if it were me, I'd recommend focusing your time on implementing redirects instead of the JS redirect off the 404.
Here is a link to more of the research I've done around this and the impact on users if you are interested (there is a slide deck and video at the end that may be easier to go through): http://www.matthewedgar.net/handle-errors-on-your-website/
For worldwide compatibility, the answer is no.
The reason is because not everyone can read messages very quickly, and depending on the contents of your error page, it might take someone with poor eyesight at least a few good minutes to read everything on it.
Also, there's a chance that the person using the site has a poor understanding of the language the error page is written in and therefore finds someone to translate the page. By the time that someone is found, a few minutes would have already elapsed.
If you do it after something like 10 seconds or more, it should be fine. It would imply that the user was not already there and just get confused but actually (as many do) opened the search result in a new tab and took them in turn until they got to yours. So a 404 page will get them to close it right away, while a redirect may give them something more helpful. Of course, some approximation of what they actually wanted will always be a better deal than just some homepage.