Let's assume there's nothing comparable on the market and you think about building this framework in your free time - so you only have to reason about this with yourself - and you're really keen on building this thing, then yeah, dig in!
However if your employer has given you a task and you consider that a good solution involves building a new framework, well, then there are so many more things to consider. Many have already been mentioned, but I like to add: who's going to use it besides you? If you have 30 developers in your company who will build stuff on your framework, then it's gonna be a big deal. Since your employer will rely heavily on it, there will also be some developers supporting you in writing docs and maintaining this thing. So... let's say "maybe".
But if it's only you and one or two coworkers, then don't. Try to build a library instead, because a library might help you for now nearly as much as a framework could, but it's not that kind of a burden as a framework is. A framework is a barrier. It changes the rules of the game. Developers need to learn it before they can start doing their job. But you should work on the opposite - you should decrease on-boarding time of new developers and make them productive as fast as possible. Not only your employer will thank you, but also your future you. ;-)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.