Max retiries and fallback flow

If a user is entering the response to a Prompt question node:

Scenario 1. If the question is a generic one like Name, email and phone number. We have a default max limit of 3 after which it shows a message like max limit reached. Is there a method to trigger a specific flow instead of the message ?
Scenario 2. If it is a ed-tech quiz bot and we need to keep a track that how many times the user has responded to that question and after 3 times of incorrectly answering the query we need to transfer the chat to an agent ? Is it done via custom functions and conditional logic nodes ?

Yes, you can achieve this via functions/conditional nodes. Initialize a count variable to 0 after the fallback node, and keep increasing the count. Based on count number you can do whatever you want.