I cannot count how many Dorfs I've seen do insanely stupid things while mining and building.
Most of the issues you list are not really pathfinding AI issues; they are more general "why doesn't DF guess what I meant to do rather than what I told it?" issues, which is very high-level AI indeed.
Pathfinding in general asks "What is the fastest way to get from A to B that can be easily found? (Or is there no path at all?)" Much of the optimization has to do with tradeoffs between "fastest path" and "easiest path to find in limited computer time"; and on dealing with changes to the paths.
Channel out a tile that's supporting the one they're standing on? Sure!
This is user error; you told them they were supposed to do that, and they trusted you wouldn't give them bad instructions. Dwarves in general do not have the ability to "look ahead"; they are reactive, not predictive, intelligences. Their overseer / the will of Armok has to do all the thinking ahead.
Walk through a newly created channel as a shortcut across to the other side when that channel is currently sporting a water or magma flow? Happy to oblige!
While avoidance of lethal situations could be better, again the dwarves don't have the ability to consider the consequences of their actions. They need to go "over there", they check to see what the best path the overseer has laid out for them, and they take it. Traffic zones are there for a reason, but they can only help so much if there isn't a readily available alternate path. It helps if you think of the dwarves as fairly short-sighted as well.
In the most general case, with default settings, a single square of Restricted has a value of 25, where a normal square has a value of 2. So, if you had a safe bridge 7 tiles upstream, the cost to go around would be 7 up + 1 over + 7 down, or 15, * 2 = 30; it's "cheaper" to go across the Restricted tile. So despite it seeming to a player that there was a readily available alternative, it was out of the dwarf's "sight range" for optimization purposes.
It may be useful to increase the value of Restricted; but in general, if dwarves shouldn't be going there, there should be a locked door or other barrier to keep them away. This will also speed up path calculations as the game can skip worrying about things on the other side. Note that if you put Restricted up *too* high, it will slow your game down as the path algorithm will need to search huge portions of your map if something goes awry.
Dig literally everywhere except the one part of the map I want them to dig in? Every freaking time.
All reachable dig designations are of equal priority by definition. If you want them to focus on one area, don't distract them with other instructions that you don't need yet. I find it useful when laying out a complex area to leave key squares not designated for digging, so that the dwarves will focus on particular areas; I can then just designate the single square to "toggle" which area they should work on next.
Trap themselves on the wrong side of a construction? Almost assured.
This can be tricky, but dwarves have directions they like to build things from. If you have plenty of room and/or proper scaffolding this isn't an issue, but if you're doing something complex knowing the way their little brains work is important. IIRC the old guideline was:
1) West is preferred over East
2) North is preferred over South
3) West and East are preferred over North and South
4) Orthogonal is preferred over Diagonal (Diagonal preferences follow the rules)
Thus:
W > E > N > S > NW > SW > NE > SE
but I've not tested this recently; has anyone done directional Science! in 0.40.xx?