Can it [MacBook] safely charge when the charger (with multiple USB-C ports) will fluctuate between 45 watts and 100 watts
Can it safely charge? Short answer: Yes.
There’s a fundamental flaw with the premise of your question: the wattage of the power adapter doesn’t fluctuate maximum wattage. Whatever the rating is (i.e. 100W), that is the maximum amount that can be drawn by the connected devices. These increases/decreases in overall power draw has absolutely no influence on the battery of your MacBook.
The wattage rating is the maximum that the adapter can supply to the device(s) attached, not by the “cables” attached.
Current is drawn, not pushed.
First, power is drawn not pushed. The device will draw the power it needs and if the adapter has the capacity to supply it, it will draw the current. For example, if you plug a cell phone that has a maximum power draw of 12W into a 100W charger, it will only draw 12W. If you plug in a second phone to that charger, they will only have a combined 24W draw. The maximum wattage of the charger will stay the same at 100W.
Power delivery is negotiated
Secondly, USB 3/4 devices don’t just pull power at some random rate causing power fluctuations in the power adapter. These devices negotiate their current delivery per the USB-PD (Power Delivery) Specification. The device will “ask”, the charger will “reply” and they will agree on how much power they get. This is why you can charge a new MacBook that requires a 90+W adapter with a 10W charger; just very, very, slowly.
Your battery is protected
Built into your battery is a PCB which does many things like keep data and stats about your battery like SN#, charge cycles, etc. However, the most important function it’s responsible for is that it provides overcharge/undercharge protection.
First, there is the charging circuity that’s controlled by the SMC to regulate how power is distributed through the logic board including to the battery. Secondly, the battery itself has it’s own charging circuitry to to protect it from receiving too much or too little charge as well ensuring it doesn’t over or under charge (detrimental to the battery).
The bottom line is raw power isn’t being dumped into your Mac or the battery. It’s being regulated to ensure it get’s the correct charge (within it’s parameters) notwithstanding any changes occurring at the charger.
If the adapter is rated for 90W, for example, it will always be able to supply up to 90W. Just because it’s only delivering 45W at a particular time means the device attached is only drawing current to consume 45W; nothing more.
As for being “safe” for your MacBook, it’s inherently safe. The charging of separate devices on the same charger don’t influence how much your MacBook has negotiated. Nor, can a change in current adversely affect your battery since the builtin (to the MacBook) charging circuitry manages the delivery of current to the battery, not the USB port.