To add on to this, the wives and heirs of daimyo had to live semi-permanently in the capital, which gave the shogun a powerful leverage over his subordinates. Any murmuring of an uprising would result in his family (and heirs) being killed. Nor was there freedom of movement across domains; this had to be granted by the shogun, preventing daimyo from easily communicating and organising.
Approximately 50-75% of a daimyo's budget went towards maintenance and boarding costs for when they were in attendance at the shogun's court. "Commerce" was considered a lowly profession not befitting a proud samurai. Most of their wealth was obtained through their right to collect agricultural taxes, which was granted to them by the daimyo.
While the samurai were a caste descended from warriors, after hundreds of years of peace they had largely become "sword-wearing bureaucrats". They weren't all that competent or experienced in warfare. They carried swords and practiced martial arts, but this was just as much a LARP (to use a modern phrase): a means of connecting to their martial heritage.