Sending a 2xx (OK) or 3xx (redirect) code for any non-existing page is not RFC and is very, very bad for search engine indexing and ranking.
You could just use mod_rewrite, checking if the file doesn't exist and redirecting to another page (internally, 2xx response code, or remotely, 3xx code) but I strongly suggest against both ways.
What most people do is creating a custom 404.shtml file with a delayed redirect (using HTTP meta data or javascript). Even a small delay (1-3 seconds) is fine, what's important is that the 404 error code is delivered.
For the "wilcard domain" matter, just add "ServerAlias www.domain.example *.domain.example" to the virtualhost. (not tested)