Advantages:
- Very nice, and central solution for a working Spamassassin config: by filtering the subjects for **SPAM**, it's easy to move the marked items to the JUNK
- No need to set it up manually for every mail account
All your advantages are already covered by the plugins SpamAssassin and RoundcubePlugins automatically.
When you activate managesieve in the RoundcubePlugins the SPAM mails of all accounts will be moved to the SPAM folder.
The sieve rule will be created automatically for each account on the server.
So no extra rules or scripts are necessary. I don't see any additional value in your solution. Only more overhead with sql query and php script which has to run every 5 min.
Maybe you did not test the RoundcubePlugins in detail or you have not seen that is already covers the SPAM mail filtering.