Yes, but beware that directly connecting a speaker output to a microphone input can be dangerous for the input port. Computer headphones or small speakers outputs are generally safe because of their low power, but anything that can directly drive more powerful speakers can damage a microphone or line input if directly connected without any attenuation network in between.
Yes, as a wild guess, putting 100ohm or 1000ohm resistors in series with each lead might make it safe for inputs and outputs, whether wired correctly or incorrectly. There is no need to keep low impedance to drive a speaker or headphone.
If we’re talking analog, those cables usually have capacitors to limit DC and a stereo-mixing resistor because of the headphone impedance (KOhms) and microphone impedance (20-200 Ohms).