This is NEVER an option.
Sure it is. Done in farms across the land.
There is nothing inherently wrong with a male-male cord. It is obviously dangerous, but only to people dumb enough to wave the pointy end around while it is plugged into a live circuit.
Similarly, the transfer switch is for people who can't figure out how to turn the main breaker off. If you have a large (100 amp) generator in the garage it is a convenience.
You will not be re-energizing the electrical grid. Circuit breakers work in both directions, and the combined load of your neighbors plus the transformer will most certainly exceed the dryer's or generator's rating and trip a breaker.
Things you genuinely do have to be concerned about:
Dryers have 2 hots and a neutral. Does the generator provide 2 phases? If yes, great. If no, connect the red and black to the generator's live wire but also disable any 240v appliance, like a stove or air conditioner. Presumably the dryer is also disabled by virtue of it's plug being in use by the generator.
Welders are 240v only. Do not use a 3-pin welder plug for a generator - the absence of a neutral will have very strange results, like the hallway light only working when you turn on the toaster.