It’s indeed a job of solution architect or CTO in smaller companies to do this review and develop a strategy telling, when something needs to be replaced by a custom code. Also it’s important to look at the costs not only in absolute values, but also relative to the IT budget. It’s ok to spend later 200K instead of 50K now if company revenue is going to be 10x higher or if your current budget is consumed by a more important project. Cost of money and resources can be different.