Chromosomal instability (CIN) and somatic copy-number alterations (SCNA) play a key role in the evolutionary process that shapes cancer genomes. SCNAs comprise many classes of clinically relevant events, such as localised amplifications, gains, losses, loss-of-heterozygosity (LOH) events, and recently discovered parallel evolutionary events revealed by multi-sample phasing. These events frequently appear jointly with whole genome doubling (WGD), a transformative event in tumour evolution involving tetraploidization of genomes preceded or followed by individual chromosomal copy-number changes and associated with an overall increase in structural CIN. While SCNAs have been leveraged for phylogeny reconstruction in the past, existing methods do not take WGD events into account and cannot model parallel evolution. They frequently make use of the infinite sites assumption, do not model horizontal dependencies between adjacent genomic loci and can not infer ancestral genomes. Here we present MEDICC2, a new phylogeny inference algorithm for allele-specific SCNA data that addresses these shortcomings. MEDICC2 dispenses with the infinite sites assumption, models parallel evolution and accurately identifies clonal and subclonal WGD events. It times SCNAs relative to each other, quantifies SCNA burden in single-sample studies and infers phylogenetic trees and ancestral genomes in multi-sample or single-cell sequencing scenarios with thousands of cells. We demonstrate MEDICC2's ability on simulated data, real-world data of 2,778 single sample tumours from the Pan-cancer analysis of whole genomes (PCAWG), 10 bulk multi-region prostate cancer patients and two recent single-cell datasets of triple-negative breast cancer comprising several thousands of single cells