none of the pages return a 404 status code
This is a pretty general issue with any CMS that works by sending all requests to /index.php and then assembling the page from databases. An ErrorDocument directive is meaningless because, as far as the server is concerned, everything is a 200: the request has been successfully handed off to the file "index.php", which exists.
Now, if the CMS is capable of displaying a "not found" page, it should certainly be capable of sending out a 404 response to go with that page. (Note that the response the visitor receives is not necessarily the same as the response the server records internally. It took me a couple of years to wrap my brain around this fact.) I stress
should be capable, which may not be the same as
does in fact. Check the settings/preferences/options carefully.
a whole folder of deleted pages
Pages that used to exist are a whole nother issue. Whether CMS or hand-rolled HTML, the server doesn't know that the page used to be there. To convey this message you need to return an explicit 410. It's done in exactly the same way no matter how the site is constructed. Assuming Apache:
RewriteRule ^name-of-deleted-directory - [G]
before the part of your htaccess that is supplied by the CMS.
A further benefit to the explicit 410 is that google (specifically) will stop crawling a lot faster, because this response can only be returned intentionally: not "sorry, can't find it" but "it used to exist but I've removed it".