All this led me to the idea that unicellular organisms, constantly changing and exchanging genes with each other, can create something like a nervous network, similar to the one that Physarum polycephalum forms. So these guys don't need a complex multicellular structure like a brain... They can all be combined into a much more complex but fragmented structure.
Such a network would, firstly, be much larger than the largest conventional brain and, secondly, would be able to take advantage of the adaptability of single-celled organisms. So, for example, instead of neural connections, this network will be able to create analogs that are needed for a given specific monent and suitable for this specific situation. For hundreds of thousands of different situations.