As far as I understand, the entire idea of dimensional analysis relies on the existence of fundamental dimensions that are independent. Because these fundamental dimensions are independent, each dimension has to appear at the same power at both sides of any equation. What is unclear to me, however, is the choice of the fundamental dimensions. Once could, for example, choose the dimensions of $length$, $time$ and $mass$ and derive the period of a pendulum simply by considering the important quantities and matching their dimensions. However, due to the existence of fundamental constants, such as the speed of light, the dimension of length and time are not independent because they can be related via $l = ct$.
Why does the dimensional analysis still work out when considering length and time as independent?
Some people include temperature, light intensity, charge, substance amount among fundamental units, however, these can be related to each other via natural constants. Which ones are the "truly" independent dimensions then and what does independence precisely mean in this context?
Upon dimensional analysis, how can we make sure that the quantities we have chosen as fundamental are indeed independent?