The trick to never having to deal with undercutters is to only ever craft or selling things that have 0 competition to begin with. Thank you, quantity sort!