Several (many? all?) EU countries do offer long-stay visas and residence permits for self-employed people but I don't think you would qualify in this scenario. Examples include Germany, The Netherlands or France.
In general, these are meant for entrepreneurs willing to invest in the country or established professionals like top lawyers, etc. The details vary but you need to demonstrate that your activity is genuine and viable and brings a benefit to the local economy. Applications require a lot of information because the authorities do not want these routes to be used to go around the (sometimes steep) requirements for regular employment visas and a mere intent to engage in self-employment or a less ambitious business would not be enough to qualify.
Another class of visa that might apply are long-term visitor visas (I don't think they exist in Germany, though). Those are typically meant for retirees or wealthy people who don't need to work. I don't think you could get one if you need to rely on your work as a software developer to meet the income requirements. Work might not be permitted either.
Incidentally, what you describe sounds like regular employment disguised as self-employment to circumvent the complexity of establishing payroll in a different country. Exact criteria and enforcement will vary from one country to the next but in many cases, that would be legally questionable even for citizens who do not need any permission to reside and work in the country. The question is not about that per se but it's important because the visa system was obviously not designed to facilitate something that might not be legal in the first place.
Similarly, requirements for regular work/employment visas assume a local contract/job offer. Generally speaking, supporting cross-border remote work is not a priority and if it is considered at all by current regulations, it is often to limit rather encourage it (e.g. that's the view taken by the UK).