Be careful, the way class namespaces are unscrambled had some quirks in 5.7 that were partly maintained for back compatibility in v8, so forum threads of that age could be at the confusing join between the two.
As a general strategy, you can declare an autoload mapping array in your package controller such as:
Escaping the backslashes is not strictly necessary, just something I am in the habit of doing.
This tells the autoloading system to find classes in the namespace \JtF\SearchPlusPlus
in the direrctory src/JtF/SearchPlusPlus
So, for example, the file: packages/jl_search_plus_plus/src/JtF/SearchPlusPlus/StopWords.php
Contains the class
And that will be autoloaded when another class or file states: use JtF\SearchPlusPlus\StopWords;
That system works nicely for general purpose classes shared within a package and automatically descends into subdirectories and sub-namespaces. Within a namespace, class names and directory names must match case exactly.
There are some historical quirks about mapping class names for blocks and any kind of controller, but I guess you are already familiar with that from developing blocks.
You can find plenty of examples from recent free packages in the marketplace from regular developers.