There are plenty of less common dog breeds that should be preserved that aren’t classified as “working dogs” any more.
Half the problem is that working breeds don’t make good sedentary pets, but some of them are pretty or give off a certain vibe, so people buy them and can’t take care of them. (See huskies, German Shepherds, Pit breeds, etc.)
Less-popular breeds with responsible clubs do just fine. Give clubs the ability to work with law enforcement to find and shut down irresponsible breeders, and the problem would be quickly resolved. Whether that’s licensing to breed or some other solution, it should be possible.