Germany has a 6 month probation period for new hires in which both sides can terminate the contract with 2 week notice. After that, it is one month, two months after 3 years going up to 7 months after 20 years.
The trick I see the most is actually hiring consultants. They're basically like employees but it's not you who hire them, it's the consultancy company. So you can have them working for your startup in short contracts of a few months (which can be prolongued and without much trouble even terminated early). But normally, they also have clauses against trying to hire the consultants directly, so if they are really good and write a good chunk of your stuff, when they leave you might be left in a bit of trouble.