If the uC still work and the drivers also work, and only that pin is stuck at 5v, maybe there is in code somewhere to make it high and hence stays at 5v. Do a full chip erase and try some a single sketch with only that pin digitalwrite() to 0 and see if it does go to gnd, else it could be fried. If it is fried, you can find another pin and change in pin definitions in pins.h to have the X axis DIR pin allocated to a pin that is currently free, then you can cut the old line and put a wire between the new pin and the bottom of the 0.100 headers for the stepper drivers, that will work. If you have a free pin that is, and i think should be something, expansion header or something like that.
Whatever you want to put on a I/O line in form of protection, it would have an impact that would end up in limiting the usability of that line, so imo thats why typically there is no protection on those lines. Lack of protection lets ppls really do whatever they want with those pins without running into unexpected issues. Cant have full protection and freedom at same time, feels like a general paradigm in more than one sense. Some low value series resistors might work as long as they are specifically not inductive types (most have parasitic inductance from being coil wired). Even so what could happen, it may form dividers with other pullups or pulldown, or perhaps will form rc filter with some other caps or even other parasitic capacitances or inductances. If the resistor value is small, it may not have any significant adverse impact but also wont be much in terms of protection, so not really effective. You put series resistors on each pin thinking at 5v shorts, dont worry the kids will find ways to short it directly to 12v line, that would still be overcurrent with the 5v resistors. If you want resistors for overcurrent at 12v, it wont solve the overvoltage. Also necessary value resistors for 12v overcurrent is like >1k therefore already become relevant to the other resistors forming voltage dividers all over the place and the board instead of outputting 5v it will output 4,5v or less, the step line may become filtered, etc.
Whatever you want to put on a I/O line in form of protection, it would have an impact that would end up in limiting the usability of that line, so imo thats why typically there is no protection on those lines. Lack of protection lets ppls really do whatever they want with those pins without running into unexpected issues. Cant have full protection and freedom at same time, feels like a general paradigm in more than one sense. Some low value series resistors might work as long as they are specifically not inductive types (most have parasitic inductance from being coil wired). Even so what could happen, it may form dividers with other pullups or pulldown, or perhaps will form rc filter with some other caps or even other parasitic capacitances or inductances. If the resistor value is small, it may not have any significant adverse impact but also wont be much in terms of protection, so not really effective. You put series resistors on each pin thinking at 5v shorts, dont worry the kids will find ways to short it directly to 12v line, that would still be overcurrent with the 5v resistors. If you want resistors for overcurrent at 12v, it wont solve the overvoltage. Also necessary value resistors for 12v overcurrent is like >1k therefore already become relevant to the other resistors forming voltage dividers all over the place and the board instead of outputting 5v it will output 4,5v or less, the step line may become filtered, etc.