what kind of severance payment should I expect in case they fire me
None
There is no such thing as a mandatory severance payment. Companies do pay severance packages, either because they think it's the right thing to do, or because an employee sued for wrongful termination. The problem in Germany is that courts are so overworked with cases that a judgement will take years to get. And the amount to pay if the company loses grows from month to month that the case is undecided. So to make their accountants happy, they will pay a fixed sum of money rather than having an unknown sum in their books for the next years. But that is only if you sue them. Generally speaking, no severance is expected when they fire you.
However
That said, in Germany you cannot simply be fired just like that (1). You have your notice period, so if they fire you today, you'd probably work there and get paid for at least 4 weeks (because for 2 years, the legal minimum is 4 weeks to the end of the month. Since they missed that by two days, they could terminate your contract on the end of April, that's almost 8 weeks). If they don't want to have you in the company, so if they want you out the door today, they can legally do so, you have no right to appear and work there... but you would still get paid until the end of your contract as dictated by the notice period, even if they escort you out the building.
So if they want to fire you, the bad thing about that is the impression it leaves in your next interview when you have to say you were fired. But you still have negotiation potential, because being fired means you will cost them another month or two of pay for, let's be real, very little gain, even if they make you work your notice period. Use this potential to reach an Aufhebungsvertrag (basically a negation of your working contract, where both parties agree to end it and then are free to decide on whatever money to pay or notice period to work or not work). You might get less money then you would have gotten through your notice period, but you weren't officially fired. You can always keep a straight face and say "the company and I decided it was better to part ways". Downside to this is that since it is your own decision compared to being fired, you don't get the same unemployment benefits. But as a software developer, you should not stay unemployed for long.
(1) You can obviously be fired for cause. But "performance" is no such cause, assuming you actually are there and working. If they fire you for cause, get a lawyer immediately, that's most likely illegal.