The archive & Delete services provided by SAG are also supported by them, so if there is a problem you can call for support.
Using self developed scripts means you are accessing the internal db structure of a product internal db structure, which is usually not supported, so everything is on your own risk including that your TN stops working.
I would not recommend such n approach. If you want to do it neverthelesse I would recommend approaching SAG support or professional services for providing the scripts.
#B2B-Integration#Integration-Server-and-ESB#webMethods