In a smart and expensive neighbourhood of Tokyo, Toshiko Horikoshi relaxes by playing her grand piano. She's a successful eye surgeon, with a private clinic, a stylish apartment, a Porsche and two pet pooches: Tinkerbell, a chihuahua, and Ginger, a poodle. "Japanese dog owners think a dog is like a child," says Horikoshi. "I have no children, so I really love my two dogs."

Many Japanese women like Horikoshi prefer pets to parenthood. Startlingly, in a country panicking over its plummeting birthrate, there are now many more pets than children. While the birthrate has been falling dramatically and the average age of Japan's population has been steadily climbing, Japan has become a pet superpower. Official estimates put the pet population at 22 million or more, but there are only 16.6 million children under 15.

Tinkerbell and Ginger have their own room and a wardrobe full of designer clothes. They have jumpers, dresses, coats and fancy dress outfits, neatly hung on jewelled hangers; hats, sunglasses and even tiny shoes. Horikoshi says she shops for her dogs most weekends and they get new clothes each season.

In Japan designer labels such as Chanel, Dior, Hermès and Gucci offer luxury dog products. This canine couture doesn't come cheap. A poodle pullover can cost $250 (around £160) or more. In many parts of Tokyo, it is easier to buy clothes for dogs than for children. Boutiques sell everything from frilly frocks to designer jeans, from nappies to organic nibbles, and smart "doggie bags" and buggies or pushchairs to transport them in.

Japan has arguably the world's most pampered pooches. Tiny lapdogs such as miniature dachshunds, poodles and chihuahuas are particularly popular because most people in Tokyo – one of the most densely populated cities in the world – live in small apartments. And there's a growing market in services and treats for pets.

The pet industry is estimated to be worth more than ¥1tn a year (around £8.2bn) and has expanded into gourmet dog food stores, hot spring resorts, yoga classes and restaurants where dogs sit on chairs to eat organic meals.

In his one-room flat in a Tokyo suburb, Jiro Akiba feeds treats to his dog Kotaro, a miniature dachshund, weighing only 3.4kg. His name means "first-born son". "He's like a first baby for us, so that's why we decided to call him Kotaro," says Akiba. "It's good to have a dog if you don't have a baby, because it is quite fun to take care of him like a baby."

Dog nappies on sale in Japan. Photograph: Ruth Evans

Akiba, a cameraman, would have liked children, but his partner (a freelance editor) wants to keep working. "In Japanese society, it's really hard for women to have a baby and keep a job … so my girlfriend decided against having a baby, and that's why we have a dog instead." Akiba says he thinks this makes economic sense, given the cost of living in Tokyo, high taxes and static salaries following two decades of recession.

Despite the economic stagnation, people seem happy to spend any spare money on photo sessions, massages and treats for their four-legged "babies". The average fertility rate is now 1.39 children per woman – well below the number needed to keep the population stable. Japan has, in effect, a self-imposed one-child policy. Government projections show if current trends continue, today's population of 128 million will fall to 43 million over the next century.

"The most important reason for Japan's declining birthrate is less sex," says Dr Kunio Kitamara, director of Japan's Family Planning Research Centre. His annual surveys indicate that the nation's libido has been lagging in the last decade. The birthrate has declined, but fewer contraceptives are being used and there are fewer abortions and lower rate of sexually transmitted diseases. "Why?" asks Dr Kitamara: "Less sex!"

His research shows that almost half of married couples have sex less than one a month, and "young people dislike sexual intercourse". His latest data from 2010 showed that 32% of young men dislike sex because "they are afraid of failure and rejection by women." Sixty percent of women in their mid- to late 20s are single, and 70% of unmarried women don't have a boyfriend. In Japan marriage is still more or less a prerequisite for having children – only 2% of children are born outside wedlock.

One young man we spoke to had dressed his dog up in a white hoodie and jeans, shoes and sunglasses because, he said, he wanted his dog to look "cute, cool and tough". His proud owner said he hoped his dog's look might attract young women, but so far he hadn't met anyone to share his life with. "I wish I could meet someone like that," he said.

Economic stagnation has hit young men particularly hard. More than 10 million people aged between 20 and 34 still live with their parents. They can't afford to get married and start a family, but for the odd luxury or treats for their dogs, they can – and do – splash out.

Designer clothes for dogs. Photograph: Ruth Evans

Smart buggies and designer doggie bags are essential for any self-respecting dog like Kotaro. "My dog really hates to go out with his feet," says Akiba. "Kotaro doesn't like walking at all."

For dogs in urgent need of exercise after a lifetime being pushed or carried around, there are spas and onsens (hot springs), which look identical to the ones for humans. For $100 (£65) a session, an attendant in a wetsuit will give Kotaro one-to-one swimming lessons, relaxing bubble baths, body massages using aromatherapy oils, deep-pore cleansing and mud packs, and even flossing or manicure services. Many dogs are "regulars" who come at least once a week – running up annual bills of $5,000 (£3,200) or more.

In Tokyo, it is easier for Horikoshi to find a canine daycare centre for Tinkerbell and Ginger than it would be to find a nursery place for a child. If Akiba and his partner decide to go on holiday, they can pay $100 a night to leave Kotaro in a dog hotel.

When the unthinkable happens, there are even temples where dead dogs are laid to rest with full Buddhist rites: a deluxe funeral and cremation ceremony can cost $8,000 (£5,000) or more. "I find these days people grieve more for their pets than for parents or grandparents," says a monk at a 1,000-year-old temple in a Tokyo suburb. "It is because pets are just like their child, so it is like losing a child."

Japan's population fell by a record number last year and in the wake of the earthquake and nuclear disasters, the National Institute of Population Research is expecting there to be a further decline in births this year, says deputy director Ryuichi Kaneko. "We realised that we are living in dangerous times," he says. "Many young people are even more hesitant to have children now."

Akiba says that although the government has tried to encourage young couples to have babies, many of the incentives, such as child benefit, are too inconsistent and subject to frequent political change. Japan's population has the longest life expectancy in the world, which – coupled with the falling birth rate – means a pensions timebomb looms. "We all – companies, the government, people young and old - need to think seriously about this problem," says Kaneko, "or Japan will have a very hard time."

One thing is certain: everything Japan has tried so far – introducing maternity leave, increasing child beneft, providing nursery places – has failed to arrest its demographic decline. Fresh thinking will be needed to persuade more Japanese people that in the long-term, man's best friend can be no substitute for man himself.

• It's a Dog's Life is on BBC World Service on Saturday 9 June at 12.05pm BST.