This KB explain how to retrieve the old SNMP ifindex, even after replacing the RE.
The SNMP ifIndex information stored in a text format file - dcd.snmp_ix , which is located in the /var/db folder.When a new interface gets created in the system, mib2d checks for an entry of the interface in the file /var/db/dcd.snmp_ix . If the entry for this index is present, the system then picks the SNMP interface index value from this file, or else it assigns a new interface index value and writes it to this file.Since the file is maintained across reboots, the next time somebody deletes and re-creates the same interface, the SNMP ifIndex does not change.
As per above, its clear that file /var/db/dcd.snmp_ix is used for the purpose & removing this file can cause changes to ifindex.
Hence, if we replace the file in new RE using the one copied from old RE, we are able to use same indices.
There no recommendations from Juniper on doing this, but there is no harm either.