I remember the story rather like this:
US: "you want to certify your fighter for nuclear devices"
Germany: "yes"
US: "ooh, that will be expensive and takes a loooong time. Don't you want to just buy our F35 instead?"
And germany basically did. With the implicit understanding, to buy a piece of nuclear protection with that. Well, all gone ... so there are really only some voices left, wanting to keep buying the expensive, potentially useless bricks.
Not in my understanding. Rather germany always went for the specialized and therefore expensive version (Goldrandlösung) of anything. But sure, parliament says, we are in peace, we don't need so many of those expensive toys. So they rather buyed only limited numbers and created another buerocratic controll gremium.
France could afford a nuclear programm and an aircraft carrier with an equal budget.
So yeah, there are many factors to blame, but I don't think it was because of too little money. Rather too much money with no one sane checking, if it serves really the purpose of defending the country.
They may lack the scale, but perhaps that can be built up.
https://ukdefencejournal.org.uk/how-much-of-the-f-35-is-brit...
The other factor is the NATO nuclear sharing arrangement. The F-35A is the only new aircraft certified to carry the US nuclear weapons under that arrangement, so that impacts Belgium, Germany, Italy, and Netherlands. Germany looked into certifying the Eurofighter Typhoon for the nuclear strike mission but decided that they couldn't afford it, and bought the F-35A instead. Of course, if the US pulls back from NATO and ends nuclear sharing then that concern would become moot and some of those countries would be likely to develop their own nuclear weapons.