### 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
return in.doc();
        }
        @Override
        protected void addDoc(LuceneDocument doc) {
            in.addDoc(doc);
        }
    }
    private final MappingLookup mappingLookup;
    private final MappingParserContext mappingParserContext;
    private final SourceToParse sourceToParse;
    private final Set<String> ignoredFields;
    private final Map<String, List<Mapper.Builder>> dynamicMappers;
    private final Set<String> newFieldsSeen;
    private final Map<String, ObjectMapper.Builder> dynamicObjectMappers;
    private final List<RuntimeField> dynamicRuntimeFields;
    private final DocumentDimensions dimensions;
    private final ObjectMapper parent;
    private final ObjectMapper.Dynamic dynamic;
    private String id;
    private Field version;
    private SeqNoFieldMapper.SequenceIDFields seqID;
    private final Set<String> fieldsAppliedFromTemplates;
    private final Set<String> copyToFields;
    private DocumentParserContext(
        MappingLookup mappingLookup,
        MappingParserContext mappingParserContext,
        SourceToParse sourceToParse,
        Set<String> ignoreFields,
        Map<String, List<Mapper.Builder>> dynamicMappers,
        Set<String> newFieldsSeen,