In principle this is a great idea, the fundamental problem is it has been tried before and backfired. For example, the UK tried a form of this under new Labour; however, all it ended up doing was promoting young girls to get pregnant to get a house. This ended up trapping them and their children on the benefit systems.
Though I have heard proposals before of ways to get around this. Basically, it is based upon rewards for those who are working and have children. For example, I believe one of them was if one parent is working while the other is a stay-at-home, then the parent who is working gets 5 percent removed from their income tax. That 5 percent would go directly to the stay-at-home parent as a bonus at the end of the year. I believe it was 2.5 percent for one child, and 5 percent for two children with that being the Max benefit.
If both are working, then both get a 1.25 percent discount if they have one child, and a 2.5 percent discount if they have two.
The fundamental flaw of course with this is that it amounts to basically a childless tax on those who don't have children. Many argue this would be fair due to how much children cost and bring to society, others have other opinions.
But you are correct, it is imperative we create a system that that looks after those who want children and who want to look after them and raise them. The problems is as you say, a person who chooses to be a stay-at-home parent puts everything into their partner, which can create an imbalance.
That is something society does need to find an answer for, what that answer is, is anyone's guess. But it is one of the problems that must be solved if we are to solve the birth rate problem.