I spent some time* working on the firmware side of developing custom electronics based on various AVR chips, ATmega328 among them. Arduinos are not good for much more than babby's first microcontroller project. They're not even that great for prototyping. Besides the aforementioned hardware design issues, the "arduino" language(really just C++) and core library had several problems both in terms of code quality and abstracting over things that shouldn't be abstracted over when working with such a limited chip(8bit, 2k SRAM...), like significant memory allocations and interactions with SREG.
My EE partner in crime ended up designing a prototyping board himself, with various creature comforts included that we needed shields for with Arduino, and I ended up writing just C with avr-libc instead of using any of the arduino library/tooling, developing a set of core modules to use the things we added to our boards, in a more flexible manner than the Arduino library. It took some time, but it saved us a lot of time and friction in our future prototyping efforts.
All that being said, there's nothing wrong with Arduino as a platform for learning and personal tinkering. I do think they could've done a better job bridging the gap between that and prototyping though.
* Ten years ago, so my memory of specifics is very fuzzy and only reflects the state of things back then.