We have had dogs here with similar issues and found the best and simplest way for us was to use a bell either near the door or at the door and train the dog to use it as a signal that they need to go outside.
We hung the bell and trained them to tap it with their foot when they needed to go outside, worked very well as an alert, dogs seem to pick up this method quickly.
#PetBehaviorandTraining