I am in a situation that I want to increase my job security because there's a risk of layoff people in the future
In Germany, the notice period is no factor when the company decides who to lay off.
Assuming the company is large enough, that worker protection laws apply, there are certain criteria that are used to determine who has to go in case of layoffs. If you want to get a higher job security, you need to either get more dependents (marry, have kids, care for sick relatives) or have a longer tenure with the company.
I was wondering what are pros and cons of having a longer mutual longer notice period between employee and employer. Is it really a good thing? What are industry standards for this kind of things?
The minimum notice period that concerns the employer firing or laying off the employee is set by law and is increasing with years worked at the company. The industry standard is either the employee keeps their notice period as defined initially in the contract, or what is also common the contract has a clause that says the notice period for both sides is the notice period required by law for one side. Both is considered a fair clause by most people. However, having an even longer notice period than required is a little strange. The minimum requirement is already long enough.
I can see many people are complaining of a longer notice period forced by company, but is it a bad thing if it required by both parties?
I'm living in Germany and the current notice period is 3 months (for both parties)
That is normal. Don't let the opinion of people outside of Germany scare you. We have hired 5 people this year, not one of them could start even the next month. In Germany, everybody has such a long notice period, that is not a disadvantage in the job market.
Notice periods between 3 and 6 months are normal. But that is not "job security". Your job is not more or less secure depending on notice period. It's just a security blanket that allows you to find a new job while still being paid when you lose your current job.