Background: I have config read-only setup on non-development environments. So all configurations (including enabled modules) are created and exported from development site and imported to different environment.
Problem: I need few new content entity types to be imported and add content of those types in database update (i.e. hook_update_N()).
As per https://www.drupal.org/node/2762235, all database updates should run before configuration import. Since my entity definitions are in configuration, hook_update_N throws fatal that entity types do not exist. I can run config-import after hook_update_N, but it can cause other problems (as mentioned in above d.o issue).
How to import configuration and content in this case?