The industrial drive towards smaller semiconductor devices is at less than 10 nano-meters. In the next few years a three-dimensional quantum confined device structure is expected. We have studied the electronic structure of hydrogen-like donor impurities in Si and Ge quantum dots with varied shape of the confinement potential. These calculations are carried out within the Density-Functional-Effective-Mass Theory (DF-EMT). We have paid particular attention to the electron-electron interaction energy in a negative charge state of the donor impurity. The effect of electron correlation on the binding energy has been explored. In addition to these, we show that the second order correction to the ground state energy obtained through perturbative approach agrees well with the DF-EMT based numerical results, down to very small sizes of the quantum dots when the depth of the confinement is moderate or small. A non-monotonic shallow-deep transition of the binding energy of neutral and charged donors of hydrogen-like impurities is expected to occur with the reduction in the size of the quantum dot. A similar effect is expected for hydrogen-like acceptor impurities as well. Furthermore, the optical gap also shows non-monotonic shallow-deep behaviour with the quantum dot size reduction. Deepening of shallow donor or acceptor level implies that the carriers will freeze out at small sizes of the dot. We believe this is quite important in the context of metal-oxide-semiconductor (MOS) devices beyond 5 nm technologies, based on Si, Ge or a combination (SiGe). We also point out possible variabilities in the binding energy of donors and acceptors if there are variations in the size of host quantum dots in a large assembly of devices in future integrated circuits. This will lead to the variabilities in the characteristics from device to device. These results should be incorporated in the Technology Computer Aided Design (TCAD) simulation of less than or equal to 5 nm MOS devices.