The technological connections made a great video on how dishwashers work. Basically, the average dishwasher doesn’t have a computer to time when and how much detergent needs to be released, it’s just a physical mechanism that, after the hot rinse cycle at the start, causes the detergent to open. door that retains detergent, releasing detergent.
Adding a reservoir, pump and controller to release the right amount of detergent at the right time would massively increase the price of a dishwasher. The increased costs probably wouldn’t be worth it for the amount a normal person or family uses a dishwasher.