Postgres as it's built now lacks any semblence of extensibility
PostGIS. pgvector. TimescaleDB. Citus. pg_cron. pgmq. Apache AGE. ParadeDB. hstore. plv8. postgres_fdw. pg_partman. pg_stat_statements...
The extension API is the thing making your thesis possible. Rewriting it away would mean deleting the exact feature you're asking for.