The main issue here is that if the OP is using a custom pipeline from any Elastic Agent integration, the event.ingested will not exist at the time the custom ingest pipeline is executed.
The event.ingested field is created by the .fleet_final_pipeline-1 ingest pipeline, which is set as the index.final_pipeline for all Elastic Agent integrations, so this will be only executed after all other pipelines.
All customizations when using Elastic Agent integrations will happen before the field is created, so the user cannot set the @timestamp to the value of event.ingested.
I think the close it can get is to use the value of _ingest.metadata, it will not be the same but probably very close, here is the example from the documentation.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.