The bad news is that prepositions are idiosyncratic, and their uses cannot be intuited confidently. Like irregular verbs or spelling, they are learned through practice and exposure, further complicated because their usage differs slightly by locale (e,g, New York, standing on line vs. in line in the rest of the U.S.) and also shifts over time.
They do not translate, either. In French you would also say, for instance, en deux jours, but en cannot be directly translated as in; French employs en where English uses like, at, or by. Similarly, English by is not equivalent to German bei, as some English by expressions would use von or mit in German, and some bei uses are expressed using at or with in English.
As your second linked question notes, the intended meaning of in 3 days would depend on context, and you would use additional modifiers or express the idea differently if you needed to be more precise. The inspector is coming in the next three days, for instance, means the inspector should be expected at any time between now and three days from now, whereas The inspector is coming in three days at the earliest of course means just the opposite, that the inspector should not be expected until at least three days from now.