Ok I've taken a closer look at the rewrite rules and it's absolutely unclear why there are so many rules. If I just look at one Page, there are maybe a thousand rewrite rules for that single page, something like:
s:53:\"vacancies/phd-studentship-wales/attachment/([^/]+)/?$\";
s:32:\"index.php?attachment=$matches[1]\";
s:63:\"vacancies/phd-studentship-wales/attachment/([^/]+)/trackback/?$\";
s:37:\"index.php?attachment=$matches[1]&tb=1\";
s:83:\"vacancies/phd-studentship-wales/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";
s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";
s:78:\"vacancies/phd-studentship-wales/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";
s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";
s:78:\"vacancies/phd-studentship-wales/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";
s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";
s:46:\"(vacancies/phd-studentship-wales)/trackback/?$\";
s:37:\"index.php?attachment=$matches[1]&tb=1\";
s:66:\"(vacancies/phd-studentship-wales)/feed/(feed|rdf|rss|rss2|atom)/?$\";
s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";
s:61:\"(vacancies/phd-studentship-wales)/(feed|rdf|rss|rss2|atom)/?$\";
s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";
s:54:\"(vacancies/phd-studentship-wales)/page/?([0-9]{1,})/?$\";
s:50:\"index.php?attachment=$matches[1]&paged=$matches[2]\";
s:61:\"(vacancies/phd-studentship-wales)/comment-page-([0-9]{1,})/?$\";
s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";
s:46:\"(vacancies/phd-studentship-wales)(/[0-9]+)?/?$\";
s:49:\"index.php?attachment=$matches[1]&page=$matches[2]\";
s:35:\"vacancies/473/attachment/([^/]+)/?$\";
s:32:\"index.php?attachment=$matches[1]\";
s:45:\"vacancies/473/attachment/([^/]+)/trackback/?$\";
s:37:\"index.php?attachment=$matches[1]&tb=1\";
s:65:\"vacancies/473/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";
s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";
s:60:\"vacancies/473/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";
s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";
s:60:\"vacancies/473/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";
s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";
s:28:\"(vacancies/473)/trackback/?$\";
That specific page has currently around 100 words and maybe 2 attachments. Somehow it seems it "remembers" all page revisions or prior versions of that page?
I'm also looking into the possibility that those pages which have the many rules, have had different attachments to them in their prior version. Looking at the rewrite rules, many have to do with attachments. The above page, "vacancies" currently has 26 attachments if you look in the add image > gallery. Only 2 of them are currently linked from the page.
But in that case it seems like to be a bug in wordpress. Why is it creating those endless rules?