If you have a specific product in mind, I don't recommend the strategy. Find investor funds and build the product.
If you don't have a specific product that you want to build, then I think it's a more viable path. Running the agency gives you a stable revenue and base to bootstrap a product when a product opportunity becomes available. Running an agency also gives you insight into pain points that multiple different companies are hitting.
So, an agency as a path to eventually developing a product makes some amount of sense but an agency as a path to develop a specific product vision probably doesn't.