I had to draw electrical and hydraulic schematics in Microsoft Visio at a past job. I'm glad that is behind me because that software is barely good enough for making flow charts. I would never recommend anyone use it for engineering diagrams.
There are expensive professional software programs that solve this problem much better, but if you are on a budget I would recommend Inkscape. It is much more stable, predictable, and has community/forum support. There is also Digikey Scheme-it. It looks good aside from being proprietary, but I have not used it.
Addressing your question: Visio supports grouping. You can also add snap points inside of groups. To draw your hashed box add a bunch of snap points around the border, connect them with your hash lines, then group all of them. You will have to make an abbreviated line symbol as a separate object with two snap points. Its irritating, but is possible. Welcome to Visio; I wish you better software in the future ;-)