Apple’s “App Store Review Guidelines” appears to expressly forbid apps updating themselves with new features:
2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code which introduces or changes features or functionality of the app, including other apps.
The Apple Developer Program License Agreement, including the latest version published 6/6/2022, explains when downloaded code is allowed in section 3.3.2:
Interpreted code may be downloaded to an Application but only so long as such code: (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store, (b) does not create a store or storefront for other code or applications, and (c) does not bypass signing, sandbox, or other security features of the OS.
Older versions of the terms used to include only JavaScriptCore but the latest terms don’t have that language anymore.
Is it allowed for you to post that here publicly? Given that the document I posted said to enroll to see the latest requirements, I would assume it’s against some terms to share it publicly. Otherwise, Apple would just publish it themselves instead of telling people to enroll.