Guessing the upgrade did iris start [instance] nostu to not run any user code on startup.
iris help start
                            **** iris usage ****
Syntax:
        iris start <instance name> [parameters]
Description:
        Run the instance's irisstart procedure to bring InterSystems IRIS up.
Optional parameters:
        quietly -> non-interactive, with minimal dialog
        nostu   -> don't run startup routine (^STU)
        help    -> list supported parameters
        EmergencyId=username,password -> start up in emergency mode
        Any other value is taken as a configuration file name with '.cpf' appended.
        If a configuration file is not specified, the file 'iris.cpf' is used.
Example:
        iris start mystuff quietly      <- uses file 'mystuff.cpf'
Notes:
        Some instances might not have support for a particular parameter,
        or a new parameter could have been added.  For a list of supported
        parameters for a specific instance, type:
                iris start <instance name> help

There are some clear warningssugestions in the documentation but very reasonable.
Customizing Start and Stop Behavior with ^%ZSTART and ^%ZSTOP Routines - Design Considerations
Using the ^ZMIRROR Routine
One issue to consider is on Failover or DR mirrors the code might need to be in ZMIRROR not ZSTART.

I don't think you need more than normal production code awareness.

This looks like what you want.

https://cedocs.intersystems.com/ens20171/csp/documatic/%25CSP.Documatic....

I would consider upgrading to the latest Cache before using compact and truncate.
Run an integrity check after to validate it didn't cause corruption.

Read this to see if applies

https://www.intersystems.com/product-alerts-advisories/alert-possible-da...

I would expect the WIJ to close to force it to the disk about every 80 seconds ie every write cycle.

my quick testing:

$while true; do
> ls -l IRIS.WIJ | cut -f 10-13 -d ' '
> sleep 40
> done
Oct 26 12:26 IRIS.WIJ
Oct 26 12:27 IRIS.WIJ
Oct 26 12:27 IRIS.WIJ
Oct 26 12:28 IRIS.WIJ
Oct 26 12:28 IRIS.WIJ
Oct 26 12:30 IRIS.WIJ
Oct 26 12:30 IRIS.WIJ
Oct 26 12:31 IRIS.WIJ
Oct 26 12:31 IRIS.WIJ
Oct 26 12:32 IRIS.WIJ
Oct 26 12:32 IRIS.WIJ
Oct 26 12:34 IRIS.WIJ
Oct 26 12:34 IRIS.WIJ
Oct 26 12:35 IRIS.WIJ
Oct 26 12:35 IRIS.WIJ
Oct 26 12:36 IRIS.WIJ

So testing shows the old way was better in this case.

Failure
iris session ${INST} -U %sys << EOF

w "stopping the mirror 1 is sucess: " zw ##class(SYS.Mirror).StopMirror("MIRROR")

h

EOF

%SYS>

%SYS>
stopping the mirror 1 is sucess: "0 "_$lb($lb(2050,,,,,,,,,$lb(,"%SYS",$lb("e^Shutdown+7^MIRRORMGR^2","e^zStopMirror+4^SYS.Mirror.1^1","e^^^0"))))/* ERROR #2050: Mirror configuration not loaded */

%SYS>
Sucess
$ iris session ${INST} -U %sys << EOF
>
> zw ##class(SYS.Mirror).StopMirror("MIRROR")                                  <
> h
> EOF


%SYS>

%SYS>
stopping the mirror 1 is sucess: 1

%SYS>

Same either way :(
iris session ${INST} -U %sys '##class(SYS.Mirror).StopMirror("MIRROR")' ;echo $?
0