An interesting project to manage indexes on postgres that seems tangentially related:
https://github.com/HypoPG/hypopg
HypoPG is a PostgreSQL extension adding support for hypothetical indexes.
An hypothetical -- or virtual -- index is an index that doesn't really exists, and thus doesn't cost CPU, disk or any resource to create. They're useful to know if specific indexes can increase performance for problematic queries, since you can know if PostgreSQL will use these indexes or not without having to spend resources to create them.
With one approach to actually implementing it here: https://www.percona.com/blog/2019/07/22/automatic-index-reco...
https://github.com/ankane/dexter is an autoindexer project that builds on hypopg, and I believe it can be configured to autocreate indices — it will only suggest them by default.
Reminds me of https://github.com/ankane/dexter with https://github.com/HypoPG/hypopg.