With the ScreenTime API Apple talks a lot about their focus on privacy and the data not leaving the device. Does that mean there would be a problem with an app where the users ScreenTime data is shared to a custom backend? Could this potentially cause an app to be rejected from the AppStore?
I believe so, you would risk getting rejected / removed from sale.
This is from the Apple Developer License Agreement:
To use the Family Controls Framework, Your Application must have a primary purpose of (1) offering family controls for parents and guardians, through Family Sharing, to supervise their children’s app usage; and/or (2) offering individuals the ability to manage their devices to enable focus and productivity through focus controls, timers and task management, or personal device usage management. The Family Controls Framework may not be used for other purposes, such as ad blocking, in organizational settings, or for managing the device of another adult individual. Device or usage data received through the Family Controls Framework may only be used for providing family controls, or individual device management. You and Your Application may not share device or usage data received through the Family Controls Framework or otherwise, beyond the family controls You provide, or the individual and their device, respectively. You may not use or share such device or usage data for purposes of advertising or advertising measurements, or share device or usage data with a data broker.
Source: https://developer.apple.com/support/terms/apple-developer-program-license-agreement/
Hope that helps!