### Elasticsearch Version

8.11+

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

any

### Problem Description

While indexing documents with dynamically added fields, if multiple of those fields are objects are are deeper than 3-5 objects, performance is degraded significantly.

This bug was introduced in: https://github.com/elastic/elasticsearch/pull/90674

### Steps to Reproduce

I built a micro-benchmark to replicate this particular bug. 

But, any dynamic object parsing will cause this.

To mitigate the issue, statically mapped fields for objects is required. 

### Logs (if relevant)

Attached are two JFR files indicating the difference between when the bug was introduce vs. not.
[Archive 2.zip](https://github.com/elastic/elasticsearch/files/13569248/Archive.2.zip)

server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java
}
    }
    public final Field version() {
        return this.version;
    }
    public final void version(Field version) {
        this.version = version;
    }
    public final String id() {
        if (id == null) {
            assert false : "id field mapper has not set the id";
            throw new IllegalStateException("id field mapper has not set the id");
        }
        return id;
    }
    public final void id(String id) {
        this.id = id;
    }
    public final SeqNoFieldMapper.SequenceIDFields seqID() {
        return this.seqID;
    }
    public final void seqID(SeqNoFieldMapper.SequenceIDFields seqID) {
        this.seqID = seqID;
    }
    /**
     * Description on the document being parsed used in error messages. Not
     * called unless there is an error.
     */
    public final String documentDescription() {
        IdFieldMapper idMapper = (IdFieldMapper) getMetadataMapper(IdFieldMapper.NAME);