As as side note, there is no way to simply transfer your money to another person (for example, back to your father) to "protect" it from the government. If you apply for social benefits, they will ask you specificiallyspecifically if you gave away large amounts of money in the past.
The € 400,000 tax-free amount is for a time span of 10 years - ten, instead the usual one year for tax-free amounts. And it is not about gifts from your father, but about the sum of gifts given to you, as you would pay tax for the money that exceeds the limit. So for € 500,000 in 10 years, you would pay tax on € 100,000 in the year it exceeds the limit.
If you coosechoose to invest (part of) the money as suggested above, you would have to pay capital gains tax. But again, there is a tax-free amount per year called Sparer-Pauschbetrag. Make sure to set up a proper Freistellungsauftrag at your bank, so they won't accidentally deduct taxes.