I've been through the mill with my 2017 A4 Allroad on this. My advice is get it fixed as soon as Brake Servo Restricted error message appears. £70 for the brake pressure sensor and 10 mins max to replac. Audi Roadside Assistance who came to my aid when message changed to Brake Failure - do not drive said there was no clear reason why this is happening but best case scenario is new brake pressure sensor @ £70, worst case in new ABS unit @ £2600. I was worst case but thankfully was cover buyAudi Approved Used warranty. Car has been off the road for 2 weeks though getting it fixed.
Around about the time the error message changed I bought a new sensor from Autodoc but it turned out I didn't need as the technician had his own supply on the van. I have a brand new brake sensor for sale if anybody wants to get in touch and buy it - never been fitted. £60 inc postage.