TVS i believe has this functionality where the vehicle calculates the lean angle and triggers the alert. I don’t think the potholes would confuse the sensors if the vehicle telemetry is used.
Timing this thread to close in 2 weeks as this has been implemented and is also a duplicate of a thread from 2021. Do respond here if there is a different opinion to reconsider closure.