The flash-message must be adjusted in TYPO3 13 or earlier. It works fine within a plugin per convention. If you break the plugin-context, you have to adjust the flash messages instead. You have these options:
Use a shared queue (needs adjustments in source and target plugin)
Use target queue (needs adjustments in source plugin)
Use source queue (needs adjustments in target plugin)