Connect apps can declare custom fields in the descriptor and admins can add such fields to issue types as described here. I checked that after an app is uninstalled and then installed again content of custom fields is preserved.
Atlassian staff: could you please share for how long the data in custom fields in next-gen projects is stored after an app is uninstalled?
Jira does not clean up data created by apps on the basis of the app being uninstalled. The post @daniel linked to provides a good summary of the current state.
Hello @danielwester@dmorrow, thanks for the answers. It’s good to know that app uninstallation doesn’t trigger data cleanup. It makes custom fields all the more useful as a storage.