Using combined strong coupling and hopping parameter expansions, we derive an effective three-dimensional theory from thermal lattice QCD with heavy Wilson quarks. The theory depends on traced Polyakov loops only and correctly reflects the centre symmetry of the pure gauge sector as well as its breaking by finite mass quarks. It is valid up to certain orders in the lattice gauge coupling and hopping parameter, which can be systematically improved. To its current order it is controlled for lattices up to N_tausim 6 at finite temperature. For nonzero quark chemical potentials, the effective theory has a fermionic sign problem which is mild enough to carry out simulations up to large chemical potentials. Moreover, by going to a flux representation of the partition function, the sign problem can be solved. As an application, we determine the deconfinement transition and its critical end point as a function of quark mass and all chemical potentials.