The wrong question is “can Salesforce do it?”
The better question is whether Salesforce should own the logic. A rule that is customer-facing, auditable and close to CRM data may belong in Salesforce. A high-volume compute task, data transformation or long-running integration may belong elsewhere.
When configuration wins
Configuration is best when the logic is straightforward, business-owned and easy to inspect. Validation, guided screens, basic routing and standard approvals should not become code just because a developer is available.
When Apex is the safer choice
Apex is appropriate when rules need transaction boundaries, bulk handling, reliable tests, reusable domain services or controlled error handling. Complex revenue, orchestration and integration code is often safer as Apex than as a maze of flows.
When to walk away
Some requirements are signals to use an external service: heavy document processing, large batch transformations, complex search, event streaming or logic shared across multiple systems. Good architecture includes saying no to the platform when the platform is not the right tool.
Bring the hard part to a senior Salesforce engineering team.