How to flash a custom recovery with heimdall (without touching the main system)?
It depends on your PIT partition file.

Before you do anything using heimdall, print the partition table of your phone. 

sudo heimdall print-pit


The output of the file is the location assigned to each partition. For example on my Galaxy S3, I have something like this:

--- Entry #20 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 19
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 491520
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Kernel2
Flash Filename: recovery.img
FOTA Filename:


Now this tells me 3 main things:


Name the flash file: recovery.img
Location of the identifier 19
And finally the name of the recovery partition Kernel2


What does this means?

This means if I want to flash a recovery image I should use either the identifier 19, or the name Kernel2.

sudo heimdall flash --19 any-type-of-recovery.img


or 

sudo heimdall flash --Kernel2 any-type-of-recovery.img


Bottom Line: Look at the pit file to figure out where to flash your recovery.

Cheers,
Mel