I am trying to replicate this in Arcade so I can use the function in Data Pipelines. I currently do a similar process in attribute rules but am moving the data to AGO. As new data comes in I need to update the new values with new sequential numbers.
How To: Create Sequential Numbers in a Field in ArcMap Using Python in the Field Calculato
Here are a few Arcade resources to create sequential numbering using Arcade:
How To: Automatically Populate Sequential Numbering for Newly Created Features in ArcGIS F
How To: Sort and Create a Sequentially Ordered ID Field in an Attribute Table in ArcGIS Pr
How To: Add Auto Sequential Values Using Attribute Rules in ArcGIS Pro
Attribute rule script expression examples—ArcGIS Pro | Documentation