Number of Subcategories

Welcome back, @lostintime!

The setting you’re looking for is

 SiteSetting.max_category_nesting = 3

You can do some searching. It’s not well documented, but I’m pretty sure that some enterprise customers are using this, so it’s a good bet that it works. I have one client that was using it, for a time at least, so it should work for you.