Anthony Saunder's Trench Warfare: 1850-1950 describes several cases of pre-WW1 trench warfare, by his definition (excluding siege warfare that has been around since ancient times).
If there was a doctrine before the war I have no memory reading about that specifically. I think this will depend on your definition of trench warfare and of doctrine. There were manuals for how to dig and man trenches before 1914. Armies trained in building different types of defensive fieldworks many centuries before that because it was needed for sieges if nothing else. A Swedish instructions manual from the early 1880's that I have has several illustrations on how to construct trenches and other works of different shapes and how to position your soldiers in them. I do not remember if it also has guidelines for how to attack enemy positions or not. There were specialists like the German pioneer (engineer) units that trained for and were equipped to attack enemy fortifications that also happened to be a good base for how to attack enemy trenches when trench warfare set in, and no doubt they had their own doctrines for how to fight.
Every army in 1914 would have had some knowledge of how to dig in and how to fight in trenches, from their pre-war training, even if they quickly became obsolete, but I doubt if there was anything called specifically a "trench warfare doctrine".